* [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value after doing dev_alloc_skb
@ 2013-08-08 10:56 Iker Pedrosa
2013-08-09 12:38 ` Dan Carpenter
0 siblings, 1 reply; 7+ messages in thread
From: Iker Pedrosa @ 2013-08-08 10:56 UTC (permalink / raw)
To: gregkh; +Cc: ikerpedrosam, devel, linux-kernel
Checking the return of dev_alloc_skb as stated in the following bug: https://bugzilla.kernel.org/show_bug.cgi?id=60401
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 8b8a5c6..50cb1fa 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -777,6 +777,8 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
/* Allocate new skb for releasing to upper layer */
sub_skb = dev_alloc_skb(RTLLIB_SKBBUFFER_SIZE);
+ if (!sub_skb)
+ return 0;
skb_reserve(sub_skb, 12);
data_ptr = (u8 *)skb_put(sub_skb, skb->len);
memcpy(data_ptr, skb->data, skb->len);
@@ -825,6 +827,8 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
/* Allocate new skb for releasing to upper layer */
sub_skb = dev_alloc_skb(nSubframe_Length + 12);
+ if (!sub_skb)
+ return 0;
skb_reserve(sub_skb, 12);
data_ptr = (u8 *)skb_put(sub_skb, nSubframe_Length);
memcpy(data_ptr, skb->data, nSubframe_Length);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value after doing dev_alloc_skb
2013-08-08 10:56 [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value after doing dev_alloc_skb Iker Pedrosa
@ 2013-08-09 12:38 ` Dan Carpenter
2013-08-16 11:44 ` Iker Pedrosa
0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2013-08-09 12:38 UTC (permalink / raw)
To: Iker Pedrosa, rucsoftsec; +Cc: gregkh, devel, linux-kernel
On Thu, Aug 08, 2013 at 12:56:44PM +0200, Iker Pedrosa wrote:
> Checking the return of dev_alloc_skb as stated in the following
> bug: https://bugzilla.kernel.org/show_bug.cgi?id=60401
>
Using bugzilla to report these sorts of bugs is a bit awkward.
Normally we would try to give credit for bug reports but bugzilla
hides the email if you aren't logged in.
Reported-by: RUC_Soft_Sec rucsoftsec@gmail.com
regards,
dan carpenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value after doing dev_alloc_skb
2013-08-09 12:38 ` Dan Carpenter
@ 2013-08-16 11:44 ` Iker Pedrosa
2013-08-16 12:28 ` Greg KH
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Iker Pedrosa @ 2013-08-16 11:44 UTC (permalink / raw)
To: Dan Carpenter; +Cc: rucsoftsec, gregkh, devel, linux-kernel
So, what should I do? Do I send the patch via bugzilla? I'm a newbie and I don't know that to do, what do you recommend me?
On Fri, 9 Aug 2013 15:38:13 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Thu, Aug 08, 2013 at 12:56:44PM +0200, Iker Pedrosa wrote:
> > Checking the return of dev_alloc_skb as stated in the following
> > bug: https://bugzilla.kernel.org/show_bug.cgi?id=60401
> >
>
> Using bugzilla to report these sorts of bugs is a bit awkward.
> Normally we would try to give credit for bug reports but bugzilla
> hides the email if you aren't logged in.
>
> Reported-by: RUC_Soft_Sec rucsoftsec@gmail.com
>
> regards,
> dan carpenter
>
--
Regards,
Iker Pedrosa <ikerpedrosam@gmail.com>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value after doing dev_alloc_skb
2013-08-16 11:44 ` Iker Pedrosa
@ 2013-08-16 12:28 ` Greg KH
2013-08-17 11:14 ` Dan Carpenter
[not found] ` <201308190915108848173@gmail.com>
2 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2013-08-16 12:28 UTC (permalink / raw)
To: Iker Pedrosa; +Cc: Dan Carpenter, rucsoftsec, devel, linux-kernel
On Fri, Aug 16, 2013 at 01:44:03PM +0200, Iker Pedrosa wrote:
> So, what should I do? Do I send the patch via bugzilla? I'm a newbie
> and I don't know that to do, what do you recommend me?
Take a look at the kernel file, Documentation/SubmittingPatches for how
to properly send a kernel patch that we can apply. If you have
questions after reading that, please let us know.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value after doing dev_alloc_skb
2013-08-16 11:44 ` Iker Pedrosa
2013-08-16 12:28 ` Greg KH
@ 2013-08-17 11:14 ` Dan Carpenter
[not found] ` <201308190915108848173@gmail.com>
2 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2013-08-17 11:14 UTC (permalink / raw)
To: Iker Pedrosa; +Cc: devel, gregkh, linux-kernel, rucsoftsec
On Fri, Aug 16, 2013 at 01:44:03PM +0200, Iker Pedrosa wrote:
> So, what should I do? Do I send the patch via bugzilla? I'm a newbie and I don't know that to do, what do you recommend me?
>
I meant that for rucsoftsec not you. You're fine.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 7+ messages in thread[parent not found: <201308190915108848173@gmail.com>]
* Re: Re: [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value afterdoing dev_alloc_skb
[not found] ` <201308190915108848173@gmail.com>
@ 2013-08-19 3:23 ` Greg KH
2013-08-19 6:52 ` Dan Carpenter
1 sibling, 0 replies; 7+ messages in thread
From: Greg KH @ 2013-08-19 3:23 UTC (permalink / raw)
To: rucsoftsec; +Cc: Iker Pedrosa, Dan Carpenter, devel, linux-kernel
On Mon, Aug 19, 2013 at 09:15:15AM +0800, rucsoftsec wrote:
> I have read that file. But the trouble is that I was not sure whether it is a
> bug or not. So I report it to BugZilla, and wait for further confirmation.
Don't worry about bugzilla, please send us a patch through email so we
can accept it. We can't take anything from bugzilla.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Re: [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value afterdoing dev_alloc_skb
[not found] ` <201308190915108848173@gmail.com>
2013-08-19 3:23 ` Re: [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value afterdoing dev_alloc_skb Greg KH
@ 2013-08-19 6:52 ` Dan Carpenter
1 sibling, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2013-08-19 6:52 UTC (permalink / raw)
To: rucsoftsec; +Cc: Greg KH, Iker Pedrosa, devel, linux-kernel
On Mon, Aug 19, 2013 at 09:15:15AM +0800, rucsoftsec wrote:
> I have read that file. But the trouble is that I was not sure
> whether it is a bug or not. So I report it to BugZilla, and wait
> for further confirmation.
> Thank you all the same!
>
If you send it to kernel-janitors we will be happy to review it.
It will be faster than bugzilla.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-08-19 6:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-08 10:56 [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value after doing dev_alloc_skb Iker Pedrosa
2013-08-09 12:38 ` Dan Carpenter
2013-08-16 11:44 ` Iker Pedrosa
2013-08-16 12:28 ` Greg KH
2013-08-17 11:14 ` Dan Carpenter
[not found] ` <201308190915108848173@gmail.com>
2013-08-19 3:23 ` Re: [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value afterdoing dev_alloc_skb Greg KH
2013-08-19 6:52 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox