From: Julia Lawall <julia.lawall@lip6.fr>
To: Kumar Amit Mehta <gmate.amit@gmail.com>
Cc: gregkh@linuxfoundation.org, navin.patidar@gmail.com,
Larry.Finger@lwfinger.net, dan.carpenter@oracle.com,
tapaswenipathak@gmail.com, abelmoyo.ab@gmail.com,
devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8188eu: core: rtw_wlan_util.c: Fix for NULL dereference
Date: Mon, 26 Jan 2015 16:59:05 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.10.1501261657590.2693@hadrien> (raw)
In-Reply-To: <1422286754-3039-1-git-send-email-gmate.amit@gmail.com>
On Mon, 26 Jan 2015, Kumar Amit Mehta wrote:
> In rtw_check_bcn_info(), check the return value of kzalloc() before
> dereferencing it, to avoid NULL pointer dereference.
>
> Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
> ---
> drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
> index 3e9b6e9..a3ffc69 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
> @@ -931,6 +931,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
> }
>
> bssid = kzalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
> + if (!bssid)
> + return _FAIL;
I haven't looked at this issue in a while, but shouldn't this be
OBD_ALLOC?
Although I still find macros parameters that are side effected to be
unpleasant...
julia
> subtype = GetFrameSubType(pframe) >> 4;
>
> --
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2015-01-26 15:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-26 15:39 Kumar Amit Mehta
2015-01-26 15:59 ` Julia Lawall [this message]
2015-01-26 16:06 ` Julia Lawall
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=alpine.DEB.2.10.1501261657590.2693@hadrien \
--to=julia.lawall@lip6.fr \
--cc=Larry.Finger@lwfinger.net \
--cc=abelmoyo.ab@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gmate.amit@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=navin.patidar@gmail.com \
--cc=tapaswenipathak@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®