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: <154883fc-a6bc-01a9-b044-dac8848e9963@linaro.org>
Date:   Fri, 11 Aug 2023 13:26:24 +0100
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Miquel Raynal <miquel.raynal@...tlin.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Robert Marko <robert.marko@...tura.hr>,
        Luka Perkov <luka.perkov@...tura.hr>,
        Michael Walle <michael@...le.cc>, linux-kernel@...r.kernel.org,
        Randy Dunlap <rdunlap@...radead.org>,
        Chen-Yu Tsai <wenst@...omium.org>,
        Daniel Golle <daniel@...rotopia.org>,
        Rafał Miłecki <rafal@...ecki.pl>
Subject: Re: [PATCH v9 1/7] nvmem: core: Create all cells before adding the
 nvmem device



On 11/08/2023 13:11, Miquel Raynal wrote:

>>
>>
> 
> nvmem_register() calls device_initialize() and later device_add(),
> which is exactly the content of device_register(). Upon error
> after device_add(), we currently call device_put(), whereas
> device_unregister would call both device_del() and device_put().
> 
> I would expect device_del() to be first called upon error before
> device_put() *after* device_add() has succeded, no?

That is correct afaiu, if device_add is succeed we need to call 
device_del(). As the patch now moved the device_add to end of function 
we really do not need device_del() in err path.

> 
>>> I also see the layout_np below should be freed before jumping in the
>>> error section.
>>
>> you mean missing of_node_put()?
> 
> Yes, I need to call of_node_put() before jumping into the error path.

Are we not already doing it in nvmem_layout_get() and 
nvmem_add_cells_from_fixed_layout() ?


> 
> Thanks,
> Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ