Re: [PATCH] rt2x00: rt2800: fix zeroing skb structure

From: Gertjan van Wingerde
Date: Sat Jul 30 2011 - 09:47:30 EST


On 07/30/11 13:32, 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@xxxxxxxxxx # 2.6.36+
> Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>

Ouch. Good catch. Let me go find a brown paper bag now :-(

Not sure if this is the source of Justin's problems, though.

Acked-by: Gertjan van Wingerde <gwingerde@xxxxxxxxx>

> ---
> 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.


--
---
Gertjan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/