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:   Thu, 1 Jun 2023 11:26:28 +0200
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Luka Perkov <luka.perkov@...tura.hr>,
        Robert Marko <robert.marko@...tura.hr>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] nvmem: core: Expose cells through sysfs

Hi Greg,

gregkh@...uxfoundation.org wrote on Thu, 1 Jun 2023 10:03:01 +0100:

> On Thu, Jun 01, 2023 at 10:51:14AM +0200, Miquel Raynal wrote:
> > > > +	/* Without exposed cells, successfully exit after
> > > > assigning an empty attributes array */
> > > > +	if (!ncells)
> > > > +		goto unlock_mutex;  
> > > 
> > > Shouldn't this check be higher up _before_ you allocate any memory?
> > > If the attribute group list is empty, nothing should be created,
> > > right?  Or will the driver core crash?
> > 
> > As you rightfully guessed it, the core will crash if no list is
> > provided at all. I need to provide an empty list with just an empty
> > member and everything goes smoothly. 
> 
> Let's fix the core, it shouldn't crash like that :)

Perfectly fine by me, I'll give this idea a try.

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ