lkml.org 
[lkml]   [2022]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2] staging: rtl8192e: Fix signedness bug in rtllib_rx_assoc_resp()
On Fri, Apr 15, 2022 at 07:22:36AM +0200, Fabio M. De Francesco wrote:
> On venerdì 15 aprile 2022 04:09:31 CEST Haowen Bai wrote:
> > function rtllib_rx_assoc_resp () unsigned errcode receive auth_parse()'s
> > errcode -ENOMEM.
> >
> > Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> > ---
> > V1->V2: reduce return random value; print its own error message.
> >
> > drivers/staging/rtl8192e/rtllib_softmac.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
>
> > [snip]
>
> It looks like you are doing too many things and that those aren't even
> discussed in your commit message.
>

Nope. The patch is one thing, but maybe it could be described better.
Here is my proposed commit message:

"The rtllib_rx_assoc_resp() function has a signedness bug because it's
a declared as a u16 but it return -ENOMEM. When you look at it more
closely it returns a mix of error codes including 0xcafe, -ENOMEM, and
a->status which is WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG. This is a mess.

Clean it up to just return standard kernel error codes. We can print
out the a->status before returning a regular error code. The printks
in the caller need to be adjusted as well."

regards,
dan carpenter

\
 
 \ /
  Last update: 2022-04-15 07:32    [W:0.057 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site