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]
Date:   Mon, 27 Jun 2022 15:26:41 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Zhi Song <zhi.song@...edance.com>
Cc:     rafael@...nel.org, Jonathan.Cameron@...wei.com, kbusch@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] node: fix error handling in node_init_node_access

On Wed, Jun 22, 2022 at 01:16:23AM +0800, Zhi Song wrote:
> dev_set_name() allocates new space to dev->name if it allocates
> successfully. But if we failed to allocate space, there won't be any
> new space for dev->name. Therefore, there's no need for calling
> kfree_const(dev->kobj.name) in dev_set_name()'s error handling.

Can you actually trigger a failure in dev_set_name()?  I ask as we don't
seem to check this anywhere in the driver core, and we should either
just not care (as it really can not fail), or fix up all instances of
that failure.

> If we failed to calling device_register(dev), we just need to call
> put_device(dev) which will do access_node freeing, kobj.name freeing
> and other cleanup.

That is a separate issue, and should be a separate change, right?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ