From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: gregkh@linuxfoundation.org
Cc: bgolaszewski@baylibre.com, andriy.shevchenko@linux.intel.com,
stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] gpio: mockup: fix resource leak in error path" failed to apply to 4.14-stable tree
Date: Thu, 19 Nov 2020 20:58:39 +0000 [thread overview]
Message-ID: <20201119205839.u7sbd4ytxjivybts@debian> (raw)
In-Reply-To: <160180783111955@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
Hi Greg,
On Sun, Oct 04, 2020 at 12:37:11PM +0200, gregkh@linuxfoundation.org wrote:
>
> The patch below does not apply to the 4.14-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
Here is the backport. Please consider for 4.14-stable.
--
Regards
Sudip
[-- Attachment #2: 0001-gpio-mockup-fix-resource-leak-in-error-path.patch --]
[-- Type: text/x-diff, Size: 1243 bytes --]
From 9c0dde685fd7e37a444a927fb9c9aca740444816 Mon Sep 17 00:00:00 2001
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Date: Tue, 8 Sep 2020 15:07:49 +0200
Subject: [PATCH] gpio: mockup: fix resource leak in error path
commit 1b02d9e770cd7087f34c743f85ccf5ea8372b047 upstream
If the module init function fails after creating the debugs directory,
it's never removed. Add proper cleanup calls to avoid this resource
leak.
Fixes: 9202ba2397d1 ("gpio: mockup: implement event injecting over debugfs")
Cc: <stable@vger.kernel.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[sudip: adjust context]
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
drivers/gpio/gpio-mockup.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpio-mockup.c b/drivers/gpio/gpio-mockup.c
index d99c8d8da9a0..a09a1334afbf 100644
--- a/drivers/gpio/gpio-mockup.c
+++ b/drivers/gpio/gpio-mockup.c
@@ -350,6 +350,7 @@ static int __init mock_device_init(void)
err = platform_driver_register(&gpio_mockup_driver);
if (err) {
platform_device_unregister(pdev);
+ debugfs_remove_recursive(gpio_mockup_dbg_dir);
return err;
}
--
2.11.0
next prev parent reply other threads:[~2020-11-19 20:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-04 10:37 FAILED: patch "[PATCH] gpio: mockup: fix resource leak in error path" failed to apply to 4.14-stable tree gregkh
2020-11-19 20:58 ` Sudip Mukherjee [this message]
2020-11-20 8:56 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201119205839.u7sbd4ytxjivybts@debian \
--to=sudipm.mukherjee@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bgolaszewski@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox