From: Dan Carpenter <dan.carpenter@oracle.com>
To: Haowen Bai <baihaowen@meizu.com>
Cc: lkp@intel.com, gregkh@linuxfoundation.org,
kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev
Subject: Re: [PATCH V5] staging: rtl8192e: Fix signedness bug in rtllib_rx_assoc_resp()
Date: Thu, 21 Apr 2022 19:22:01 +0300 [thread overview]
Message-ID: <20220421162201.GC2462@kadam> (raw)
In-Reply-To: <1650529277-7893-1-git-send-email-baihaowen@meizu.com>
On Thu, Apr 21, 2022 at 04:21:17PM +0800, Haowen Bai wrote:
> 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.
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
> V1->V2: reduce return random value; print its own error message.
> V2->V3: change commit message; change s16 -> int.
> V3->V4:
> 1. change message suggested by Dan Carpenter;
> 2. hold a->status in auth_parse() and return error code or 0 on success.
> 3. print le16_to_cpu(errcode) -> int %d.
> V4->V5: fix compile error.
>
Looks ok.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH V5] staging: rtl8192e: Fix signedness bug in rtllib_rx_assoc_resp()
Date: Thu, 21 Apr 2022 19:22:01 +0300 [thread overview]
Message-ID: <20220421162201.GC2462@kadam> (raw)
In-Reply-To: <1650529277-7893-1-git-send-email-baihaowen@meizu.com>
[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]
On Thu, Apr 21, 2022 at 04:21:17PM +0800, Haowen Bai wrote:
> 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.
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
> V1->V2: reduce return random value; print its own error message.
> V2->V3: change commit message; change s16 -> int.
> V3->V4:
> 1. change message suggested by Dan Carpenter;
> 2. hold a->status in auth_parse() and return error code or 0 on success.
> 3. print le16_to_cpu(errcode) -> int %d.
> V4->V5: fix compile error.
>
Looks ok.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
regards,
dan carpenter
next prev parent reply other threads:[~2022-04-21 16:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-15 2:09 [PATCH V2] staging: rtl8192e: Fix signedness bug in rtllib_rx_assoc_resp() Haowen Bai
2022-04-15 5:22 ` Fabio M. De Francesco
2022-04-15 5:31 ` Dan Carpenter
2022-04-15 5:50 ` [PATCH V3] " Haowen Bai
2022-04-15 6:06 ` Fabio M. De Francesco
2022-04-15 6:10 ` Fabio M. De Francesco
2022-04-15 6:15 ` [PATCH V4] " Haowen Bai
2022-04-15 6:20 ` Dan Carpenter
2022-04-15 6:39 ` Haowen Bai
2022-04-15 6:58 ` Dan Carpenter
2022-04-15 7:21 ` Haowen Bai
2022-04-20 16:41 ` Greg Kroah-Hartman
2022-04-21 1:34 ` Haowen Bai
2022-04-21 8:09 ` kernel test robot
2022-04-21 8:21 ` [PATCH V5] " Haowen Bai
2022-04-21 8:21 ` Haowen Bai
2022-04-21 16:22 ` Dan Carpenter [this message]
2022-04-21 16:22 ` Dan Carpenter
2022-04-18 1:48 ` [PATCH V4] " baihaowen
2022-04-15 6:18 ` [PATCH V3] " Dan Carpenter
2022-04-15 5:25 ` [PATCH V2] " Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220421162201.GC2462@kadam \
--to=dan.carpenter@oracle.com \
--cc=baihaowen@meizu.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=lkp@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.