lists.openwall.net   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  linux-cve-announce  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]
Message-ID: <68d10a9b27a0a3894a290b28c1a22085@walle.cc>
Date:   Wed, 08 Feb 2023 16:28:45 +0100
From:   Michael Walle <michael@...le.cc>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org,
        Tudor Ambarus <tudor.ambarus@...rochip.com>,
        Pratyush Yadav <pratyush@...nel.org>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-mtd@...ts.infradead.org
Subject: Re: [PATCH v3] mtd: spi-nor: fix memory leak when using
 debugfs_lookup()

> +static void __exit spi_nor_module_exit(void)
> +{
> +	spi_nor_debugfs_shutdown();
> +	spi_mem_driver_unregister(&spi_nor_driver);

Hm, does the order matter here? I didn't test it, but this will
lead to:

rootdir = debugfs_create_dir("spi-nor", NULL);
nor->debugfs_root = debugfs_create_dir("spi0", rootdir);
debugfs_remove(rootdir);
debugfs_remove(nor->debugfs_root);

If that's ok, then this looks good.

-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ