linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Justin Piszcz <jpiszcz@lucidpixels.com>,
	Ivo van Doorn <IvDoorn@gmail.com>,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	Alan Piszcz <ap@solarrain.com>,
	"users@rt2x00.serialmonkey.com" <users@rt2x00.serialmonkey.com>
Subject: [PATCH] rt2x00: rt2800: fix zeroing skb structure
Date: Sat, 30 Jul 2011 13:32:56 +0200	[thread overview]
Message-ID: <20110730113255.GB2847@redhat.com> (raw)
In-Reply-To: <20110730113009.GA2847@redhat.com>

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


  reply	other threads:[~2011-07-30 11:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27 23:33 3.0: rt2800usb(Kernel PANIC) vs. rt2780sta(GOOD/2.6.38) Justin Piszcz
2011-07-28  5:34 ` Andreas Hartmann
2011-07-28 16:18 ` Larry Finger
2011-07-30 11:30   ` Stanislaw Gruszka
2011-07-30 11:32     ` Stanislaw Gruszka [this message]
2011-07-30 11:39       ` [PATCH] rt2x00: rt2800: fix zeroing skb structure Justin Piszcz
2011-07-30 14:20         ` Justin Piszcz
2011-07-30 14:32           ` Justin Piszcz
2011-07-30 15:05             ` Andreas Hartmann
2011-07-30 17:07               ` Justin Piszcz
2011-07-30 17:10                 ` Justin Piszcz
2011-07-31  3:41                   ` Adam Cozzette
2011-07-31 10:09                     ` Justin Piszcz
2011-07-30 18:07                 ` Larry Finger
2011-08-03 16:00                 ` Stanislaw Gruszka
2011-08-03 17:31                   ` Justin Piszcz
2011-08-03 17:44                     ` Justin Piszcz
2011-08-03 18:32                       ` Justin Piszcz
2011-08-03 18:33                       ` Stanislaw Gruszka
2011-08-03 18:35                         ` Justin Piszcz
2011-08-03 18:42                           ` Justin Piszcz
2011-08-03 18:49                             ` Justin Piszcz
2011-08-04  8:03                         ` Justin Piszcz
2011-08-04 12:43                           ` Stanislaw Gruszka
2011-08-05 16:13                           ` [rt2x00-users] " Aleksandar Milivojevic
2011-07-30 13:41       ` Gertjan van Wingerde
2011-07-30 14:02       ` Ivo Van Doorn

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=20110730113255.GB2847@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=IvDoorn@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=ap@solarrain.com \
    --cc=jpiszcz@lucidpixels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=users@rt2x00.serialmonkey.com \
    /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;
as well as URLs for NNTP newsgroup(s).