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] [day] [month] [year] [list]
Message-ID: <06646231-d67e-453a-a1a0-d2665c1f9421@sirena.org.uk>
Date:   Mon, 2 Oct 2023 14:02:17 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Woody Zhang <woodylab@...mail.com>
Cc:     Chen-Yu Tsai <wens@...e.org>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Samuel Holland <samuel@...lland.org>,
        linux-spi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-sunxi@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] spi: sun4i: Fix memory leak on device removal

On Mon, Oct 02, 2023 at 02:29:59PM +0800, Woody Zhang wrote:

> Call spi_master_put to free the spi_master structure on device removal
> and driver detachment.

>  static void sun4i_spi_remove(struct platform_device *pdev)
>  {
> +	struct spi_master *master = dev_get_drvdata(&pdev->dev);
> +
>  	pm_runtime_force_suspend(&pdev->dev);
> +	spi_master_put(master);
>  }

This is just obviously buggy, it doesn't match the registration at all.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ