lkml.org 
[lkml]   [2011]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rt2x00: rt2800: fix zeroing skb structure


On Sat, 30 Jul 2011, Stanislaw Gruszka wrote:

> We should clear skb->data not skb itself. Bug was introduced by:
> commit 0b8004aa12d13ec750d102ba4082a95f0107c649 "rt2x00: Properly
> reserve room for descriptors in skbs".
>
> Cc: stable@kernel.org # 2.6.36+
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> drivers/net/wireless/rt2x00/rt2800lib.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 75d2c6c..f94d669 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -703,8 +703,7 @@ void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc)
> /*
> * Add space for the TXWI in front of the skb.
> */
> - skb_push(entry->skb, TXWI_DESC_SIZE);
> - memset(entry->skb, 0, TXWI_DESC_SIZE);
> + memset(skb_push(entry->skb, TXWI_DESC_SIZE), 0, TXWI_DESC_SIZE);
>
> /*
> * Register descriptor details in skb frame descriptor.
> --
> 1.7.4
>

Hi,

Testing w/ Linux kernel 3.0:

# patch -p1 < ../patch3
patching file drivers/net/wireless/rt2x00/rt2800lib.c
Hunk #1 succeeded at 784 (offset 81 lines).

Compiled/installed.

Will reboot shortly, need to run a backup first, thanks.

Justin.



\
 
 \ /
  Last update: 2011-07-30 13:43    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site