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: <20180906.003701.1191480642819924726.anemo@mba.ocn.ne.jp>
Date:   Thu, 06 Sep 2018 00:37:01 +0900 (JST)
From:   Atsushi Nemoto <anemo@....ocn.ne.jp>
To:     dingxiang@...s.chinamobile.com
Cc:     ralf@...ux-mips.org, paul.burton@...s.com, jhogan@...nel.org,
        linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] mips: txx9: fix resource leak after register fail

On Wed,  5 Sep 2018 19:22:19 +0800, Ding Xiang <dingxiang@...s.chinamobile.com> wrote:
> the memory allocated and ioremap address need free after
> device_register return error.
...
>  exit_put:
>  	put_device(&dev->dev);
> -	return;
> +exit_free:
> +	iounmap(dev->base);
> +	kfree(dev);

This change will break exit_put error path.
I think kfree will be called from txx9_device_release by put_device.

Please refer James's comment on previous trial:
<https://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=20180305221833.GJ4197%40saruman>

---
Atsushi Nemoto

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ