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: <20220726154602.GQ2316@kadam>
Date:   Tue, 26 Jul 2022 18:46:02 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Phillip Potter <phil@...lpotter.co.uk>
Cc:     gregkh@...uxfoundation.org, Larry.Finger@...inger.net,
        paskripkin@...il.com, straube.linux@...il.com, martin@...ser.cx,
        abdun.nihaal@...il.com, philipp.g.hortmann@...il.com,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: r8188eu: convert rtw_pwr_wakeup to correct
 error code semantics

On Tue, Jul 26, 2022 at 04:35:59PM +0300, Dan Carpenter wrote:
> On Mon, Jul 25, 2022 at 11:07:45PM +0100, Phillip Potter wrote:
> > Convert the rtw_pwr_wakeup function to use 0 on success and an appropriate
> > error code on error. For the first failure block where ips_leave is
> > invoked, use -ENOMEM as this is the main cause of failure here anyway.
> > For the second failure block, use -EBUSY, as it seems the most
> > appropriate.
> > 
> > Finally, within the functions rtw_wx_set_mode, rtw_wx_set_wap,
> > rtw_wx_set_scan and rtw_wx_set_essid, pass the error code on from
> > rtw_pwr_wakeup as appropriate now that it is converted.
> > 
> > This gets the driver closer to removal of the non-standard _SUCCESS and
> > _FAIL definitions, which are inverted compared to the standard in-kernel
> > error code mechanism.
> > 
> > Signed-off-by: Phillip Potter <phil@...lpotter.co.uk>
> > ---
> > 
> > Changes from V1: Act on feedback from Dan Carpenter:
> > * Try to use more appropriate error codes than -EPERM.
> > * Revert the places where existing -1 was converted as they are out of
> >   scope.
> > * Preserve error codes in places where calling function already uses
> >   proper negative semantics, so that they can be passed through to the
> >   caller.
> > 
> 
> This is a much better patch, right?  Everything hangs together better.
> 
> There are seven callers which need to be updated and all of them are
> updated.
> 
> Reviewed-by: Dan Carpenter

Oops.  I messed up my R-b tag.

Reviewed-by: Dan Carpenter <dan.carpenter@...cle.com>

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ