From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
devel@driverdev.osuosl.org, Chaitanya Hazarey <c@24.io>,
linux-kernel@vger.kernel.org, Greg Donald <gdonald@gmail.com>,
Koray Gulcu <koray.gulcu@ozu.edu.tr>
Subject: Re: [PATCH v2] staging: rtl8192u: r8192U_core: Fix for possible null pointer dereference
Date: Thu, 5 Feb 2015 18:13:22 +0530 [thread overview]
Message-ID: <20150205124322.GA8137@sudip-PC> (raw)
In-Reply-To: <20150205122745.GF5336@mwanda>
On Thu, Feb 05, 2015 at 03:27:45PM +0300, Dan Carpenter wrote:
> I don't know if this patch was merged before Greg cleaned out his inbox.
>
> It's a good patch if you could just clean it up a bit.
>
> On Thu, Jan 29, 2015 at 07:59:12PM +0100, Rickard Strandqvist wrote:
> > Fix a possible null pointer dereference, there is
> > otherwise a risk of a possible null pointer dereference.
>
> The change log should say that "driver_info" is the NULL pointer. It
> should say that by default stats->RxIs40MHzPacket is zero (as opposed to
> uninitialized memory).
>
> >
<snip>
> > +++ b/drivers/staging/rtl8192u/r8192U_core.c
> > @@ -4476,11 +4476,11 @@ static void query_rxdesc_status(struct sk_buff *skb,
> >
> > /* for debug 2008.5.29 */
> >
> > - //added by vivi, for MP, 20080108
> > - stats->RxIs40MHzPacket = driver_info->BW;
> > - if (stats->RxDrvInfoSize != 0)
> > + if (driver_info && stats->RxDrvInfoSize != 0) {
> > + //added by vivi, for MP, 20080108
>
> Delete these kinds of comments, please.
>
>
> > + stats->RxIs40MHzPacket = driver_info->BW;
> > TranslateRxSignalStuff819xUsb(skb, stats, driver_info);
> > -
> > + }
but in the present form the logic is changing. can you please check the following idea -
if (driver_info) {
stats->RxIs40MHzPacket = driver_info->BW;
if (stats->RxDrvInfoSize != 0)
TranslateRxSignalStuff819xUsb(skb, stats, driver_info);
}
regards
sudip
>
> regards,
> dan carpenter
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2015-02-05 12:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 18:59 [PATCH v2] staging: rtl8192u: r8192U_core: Fix for possible null pointer dereference Rickard Strandqvist
2015-02-02 16:51 ` Sudip Mukherjee
2015-02-04 20:05 ` Rickard Strandqvist
2015-02-05 12:27 ` Dan Carpenter
2015-02-05 12:43 ` Sudip Mukherjee [this message]
2015-02-05 12:51 ` Dan Carpenter
2015-02-05 17:39 ` Rickard Strandqvist
2015-02-06 14:32 ` Sudip Mukherjee
2015-02-07 13:04 ` Rickard Strandqvist
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=20150205124322.GA8137@sudip-PC \
--to=sudipm.mukherjee@gmail.com \
--cc=c@24.io \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gdonald@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=koray.gulcu@ozu.edu.tr \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=rickard_strandqvist@spectrumdigital.se \
/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