[linux] 01/01: mtd: nandsim: remove debugfs entries in error path

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Tue Aug 29 20:31:51 UTC 2017


This is an automated email from the git hooks/post-receive script.

ukleinek pushed a commit to branch sid
in repository linux.

commit 4a53c826d633412a8af90eab9060a9170c7c8763
Author: Uwe Kleine-König <ukleinek at debian.org>
Date:   Tue Aug 29 22:31:30 2017 +0200

    mtd: nandsim: remove debugfs entries in error path
---
 debian/changelog                                   |  3 ++
 ...dsim-remove-debugfs-entries-in-error-path.patch | 34 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 38 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index d907271..d4453cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -135,6 +135,9 @@ linux (4.12.9-1) UNRELEASED; urgency=medium
   * [armel] Disable CONFIG_STRICT_KERNEL_RWX, which will save about 3MB
     on linux Image (before compression). (Closes: #870185)
 
+  [ Uwe Kleine-König ]
+  * mtd: nandsim: remove debugfs entries in error path
+
  -- Ben Hutchings <ben at decadent.org.uk>  Mon, 14 Aug 2017 19:47:30 +0100
 
 linux (4.12.6-1) unstable; urgency=medium
diff --git a/debian/patches/bugfix/all/mtd-nandsim-remove-debugfs-entries-in-error-path.patch b/debian/patches/bugfix/all/mtd-nandsim-remove-debugfs-entries-in-error-path.patch
new file mode 100644
index 0000000..6d9f4be
--- /dev/null
+++ b/debian/patches/bugfix/all/mtd-nandsim-remove-debugfs-entries-in-error-path.patch
@@ -0,0 +1,34 @@
+From: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
+Date: Wed, 23 Aug 2017 09:03:04 +0200
+Subject: [PATCH] mtd: nandsim: remove debugfs entries in error path
+Origin: https://git.kernel.org/linus/b974696da1cfc5aa0c29ed97dc8f6c239899e64b
+
+The debugfs entries must be removed before an error is returned in the
+probe function. Otherwise another try to load the module fails and when
+the debugfs files are accessed without the module loaded, the kernel
+still tries to call a function in that module.
+
+Fixes: 5346c27c5fed ("mtd: nandsim: Introduce debugfs infrastructure")
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
+Reviewed-by: Richard Weinberger <richard at nod.at>
+Acked-by: Boris Brezillon <boris.brezillon at free-electrons.com>
+Signed-off-by: Brian Norris <computersforpeace at gmail.com>
+---
+ drivers/mtd/nand/nandsim.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
+index 03a0d057bf2f..e4211c3cc49b 100644
+--- a/drivers/mtd/nand/nandsim.c
++++ b/drivers/mtd/nand/nandsim.c
+@@ -2373,6 +2373,7 @@ static int __init ns_init_module(void)
+         return 0;
+ 
+ err_exit:
++	nandsim_debugfs_remove(nand);
+ 	free_nandsim(nand);
+ 	nand_release(nsmtd);
+ 	for (i = 0;i < ARRAY_SIZE(nand->partitions); ++i)
+-- 
+2.14.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 5ff613e..ac0a474 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -85,6 +85,7 @@ bugfix/all/kbuild-include-addtree-remove-quotes-before-matching-path.patch
 bugfix/all/rtlwifi-fix-memory-leak-when-firmware-request-fails.patch
 bugfix/all/rtlwifi-fix-fallback-firmware-loading.patch
 bugfix/all/bfq-re-enable-auto-loading-when-built-as-a-module.patch
+bugfix/all/mtd-nandsim-remove-debugfs-entries-in-error-path.patch
 
 # Miscellaneous features
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list