lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Nov 2020 12:03:22 +0100
From:   Greg Kroah-Hartman <>
Cc:     Greg Kroah-Hartman <>,,
        Bartosz Golaszewski <>,
        Andy Shevchenko <>,
        Sudip Mukherjee <>
Subject: [PATCH 4.14 11/17] gpio: mockup: fix resource leak in error path

From: Bartosz Golaszewski <>

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

Fixes: 9202ba2397d1 ("gpio: mockup: implement event injecting over debugfs")
Cc: <>
Signed-off-by: Bartosz Golaszewski <>
Reviewed-by: Andy Shevchenko <>
[sudip: adjust context]
Signed-off-by: Sudip Mukherjee <>
Signed-off-by: Greg Kroah-Hartman <>
 drivers/gpio/gpio-mockup.c |    1 +
 1 file changed, 1 insertion(+)

--- 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) {
+		debugfs_remove_recursive(gpio_mockup_dbg_dir);
 		return err;

Powered by blists - more mailing lists