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]
Date:   Tue, 23 Mar 2021 13:04:49 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Greg KH <gregkh@...uxfoundation.org>,
        Bard Liao <yung-chuan.liao@...ux.intel.com>
Cc:     alsa-devel@...a-project.org, vkoul@...nel.org,
        vinod.koul@...aro.org, linux-kernel@...r.kernel.org,
        srinivas.kandagatla@...aro.org, rander.wang@...ux.intel.com,
        hui.wang@...onical.com, sanyog.r.kale@...el.com,
        bard.liao@...el.com
Subject: Re: [PATCH] soundwire: intel: move to auxiliary bus


>> Note that the auxiliary bus API has separate init and add steps, which
>> requires more attention in the error unwinding paths. The main loop
>> needs to deal with kfree() and auxiliary_device_uninit() for the
>> current iteration before jumping to the common label which releases
>> everything allocated in prior iterations.
> 
> The init/add steps can be moved together in the aux bus code if that
> makes this usage simpler.  Please do that instead.

IIRC the two steps were separated during the auxbus reviews to allow the 
parent to call kfree() on an init failure, and auxiliary_device_uninit() 
afterwards.

https://www.kernel.org/doc/html/latest/driver-api/auxiliary_bus.html#auxiliary-device

With a single auxbus_register(), the parent wouldn't know whether to use 
kfree() or auxiliary_device_uinit() when an error is returned, would it?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ