Patch "platform/chrome: kunit: initialize lock for fake ec_dev" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    platform/chrome: kunit: initialize lock for fake ec_dev

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     platform-chrome-kunit-initialize-lock-for-fake-ec_de.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 14269af052e05b0e1a11d039dfc0498cb91d18ff
Author: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
Date:   Tue Oct 3 08:05:04 2023 +0000

    platform/chrome: kunit: initialize lock for fake ec_dev
    
    [ Upstream commit e410b4ade83d06a046f6e32b5085997502ba0559 ]
    
    cros_ec_cmd_xfer() uses ec_dev->lock.  Initialize it.
    
    Otherwise, dmesg shows the following:
    > DEBUG_LOCKS_WARN_ON(lock->magic != lock)
    > ...
    > Call Trace:
    >  ? __mutex_lock
    >  ? __warn
    >  ? __mutex_lock
    >  ...
    >  ? cros_ec_cmd_xfer
    
    Reviewed-by: Guenter Roeck <groeck@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231003080504.4011337-1-tzungbi@xxxxxxxxxx
    Signed-off-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/platform/chrome/cros_ec_proto_test.c b/drivers/platform/chrome/cros_ec_proto_test.c
index 5b9748e0463bc..63e38671e95a6 100644
--- a/drivers/platform/chrome/cros_ec_proto_test.c
+++ b/drivers/platform/chrome/cros_ec_proto_test.c
@@ -2668,6 +2668,7 @@ static int cros_ec_proto_test_init(struct kunit *test)
 	ec_dev->dev->release = cros_ec_proto_test_release;
 	ec_dev->cmd_xfer = cros_kunit_ec_xfer_mock;
 	ec_dev->pkt_xfer = cros_kunit_ec_xfer_mock;
+	mutex_init(&ec_dev->lock);
 
 	priv->msg = (struct cros_ec_command *)priv->_msg;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux