Staging: rtl8192e: rtllib_rx: checking NULL value after doing dev_alloc_skb
PATCH 1/1 Staging: rtl8192e: rtllib_rx: checking NULL value after doing dev_alloc_skb
Checking the return of dev_alloc_skb as stated in the following bug: https://bugzilla.kernel.org/show_bug.cgi?id=60401
--- drivers/staging/rtl8192e/rtllib_rx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/staging/rtl8192e/rtllib_rx.c +4 -0
@@ -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);
Signature · 1 line
1.8.1.2
Quoted 3 lines · Iker Pedrosa
Checking the return of
dev_alloc_skbas stated in the following
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.
regards,
dan carpenter
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?
Quoted 14 lines · On Fri, 9 Aug 2013 15:38:13 +0300 Dan Carpenter <[email protected]>…
Quoted 3 lines · Iker Pedrosa
Checking the return of
dev_alloc_skbas stated in the followingUsing 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 [email protected]regards,
dan carpenter
Signature · 3 lines
Regards, Iker Pedrosa <[email protected]>
Greg KH
maintainerQuoted 2 lines · Iker Pedrosa
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
Quoted 2 lines · Iker Pedrosa
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Greg KH
maintainerRe: Re: [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value afterdoing dev_alloc_skb
Quoted 2 lines · rucsoftsec
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
Re: Re: [PATCH] Staging: rtl8192e: rtllib_rx: checking NULL value afterdoing dev_alloc_skb
In reply to a message not in the archiveQuoted 5 lines · rucsoftsec
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