Patch "of: gpio unittest kfree() wrong object" has been added to the 5.4-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

    of: gpio unittest kfree() wrong object

to the 5.4-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:
     of-gpio-unittest-kfree-wrong-object.patch
and it can be found in the queue-5.4 subdirectory.

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


>From fb227f597d612c6660888d1947e68a25fed7b9cc Mon Sep 17 00:00:00 2001
From: Frank Rowand <frank.rowand@xxxxxxxx>
Date: Wed, 25 Mar 2020 20:45:30 -0500
Subject: of: gpio unittest kfree() wrong object

From: Frank Rowand <frank.rowand@xxxxxxxx>

commit fb227f597d612c6660888d1947e68a25fed7b9cc upstream.

kernel test robot reported "WARNING: held lock freed!" triggered by
unittest_gpio_remove().  unittest_gpio_remove() was unexpectedly
called due to an error in overlay tracking.  The remove had not
been tested because the gpio overlay removal tests have not been
implemented.

kfree() gdev instead of pdev.

Fixes: f4056e705b2e ("of: unittest: add overlay gpio test to catch gpio hog problem")
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Frank Rowand <frank.rowand@xxxxxxxx>
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/of/unittest.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -124,7 +124,7 @@ static int unittest_gpio_remove(struct p
 		gpiochip_remove(&gdev->chip);
 
 	platform_set_drvdata(pdev, NULL);
-	kfree(pdev);
+	kfree(gdev);
 
 	return 0;
 }


Patches currently in stable-queue which might be from frank.rowand@xxxxxxxx are

queue-5.4/of-unittest-add-overlay-gpio-test-to-catch-gpio-hog-.patch
queue-5.4/of-unittest-fix-expect-text-for-gpio-hog-errors.patch
queue-5.4/of-gpio-unittest-kfree-wrong-object.patch




[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