netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2.6.35] WiMAX pull request
@ 2010-05-25 17:45 Inaky Perez-Gonzalez
  2010-05-25 17:45 ` [patch 2.6.35] wimax/i2400m: fix bad race condition check in RX path Inaky Perez-Gonzalez
  2010-05-25 21:05 ` [patch 2.6.35] WiMAX pull request David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: Inaky Perez-Gonzalez @ 2010-05-25 17:45 UTC (permalink / raw)
  To: netdev, wimax; +Cc: Inaky Perez-Gonzalez

From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>

The following changes since commit 0fb0a4f00aaf5de9f328273d7a46e3aa27dab496:
  Inaky Perez-Gonzalez (1):
        wimax/i2400m: driver defaults to firmware v1.5 for i6x60 devices

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax.git wimax-2.6.35.y

Patches follow for reviewing convenience.

Inaky Perez-Gonzalez (1):
      wimax/i2400m: fix bad race condition check in RX path

 drivers/net/wimax/i2400m/rx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [patch 2.6.35] wimax/i2400m: fix bad race condition check in RX path
  2010-05-25 17:45 [patch 2.6.35] WiMAX pull request Inaky Perez-Gonzalez
@ 2010-05-25 17:45 ` Inaky Perez-Gonzalez
  2010-05-25 21:05 ` [patch 2.6.35] WiMAX pull request David Miller
  1 sibling, 0 replies; 7+ messages in thread
From: Inaky Perez-Gonzalez @ 2010-05-25 17:45 UTC (permalink / raw)
  To: netdev, wimax; +Cc: Inaky Perez-Gonzalez

From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>

The i2400m->rx_roq data structure is protected against race conditions
with a reference count (i2400m->rx_roq_refcount); the pointer can be
read-referenced under the i2400m->rx_lock spinlock.

The code in i2400m_rx_edata() wasn't properly following access
protocol, performing an invalid check on i2400m->rx_roq (which is
cleared to NULL when the refcount drops to zero). As such, it was
missing to detect when the data structure is no longer valid and
oopsing with a NULL pointer dereference.

This commit fixes said check by verifying, under the rx_lock spinlock,
that i2400m->rx_roq is non-NULL and then increasing the reference
count before dropping the spinlock.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
---
 drivers/net/wimax/i2400m/rx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c
index c835ae8..6cd12d6 100644
--- a/drivers/net/wimax/i2400m/rx.c
+++ b/drivers/net/wimax/i2400m/rx.c
@@ -1033,12 +1033,12 @@ void i2400m_rx_edata(struct i2400m *i2400m, struct sk_buff *skb_rx,
 		ro_sn = (reorder >> I2400M_RO_SN_SHIFT) & I2400M_RO_SN;
 
 		spin_lock_irqsave(&i2400m->rx_lock, flags);
-		roq = &i2400m->rx_roq[ro_cin];
-		if (roq == NULL) {
+		if (i2400m->rx_roq == NULL) {
 			kfree_skb(skb);	/* rx_roq is already destroyed */
 			spin_unlock_irqrestore(&i2400m->rx_lock, flags);
 			goto error;
 		}
+		roq = &i2400m->rx_roq[ro_cin];
 		kref_get(&i2400m->rx_roq_refcount);
 		spin_unlock_irqrestore(&i2400m->rx_lock, flags);
 
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [patch 2.6.35] WiMAX pull request
  2010-05-25 17:45 [patch 2.6.35] WiMAX pull request Inaky Perez-Gonzalez
  2010-05-25 17:45 ` [patch 2.6.35] wimax/i2400m: fix bad race condition check in RX path Inaky Perez-Gonzalez
@ 2010-05-25 21:05 ` David Miller
  1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2010-05-25 21:05 UTC (permalink / raw)
  To: inaky; +Cc: netdev, wimax, inaky.perez-gonzalez

From: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Date: Tue, 25 May 2010 10:45:12 -0700

> The following changes since commit 0fb0a4f00aaf5de9f328273d7a46e3aa27dab496:
>   Inaky Perez-Gonzalez (1):
>         wimax/i2400m: driver defaults to firmware v1.5 for i6x60 devices
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax.git wimax-2.6.35.y
> 
> Patches follow for reviewing convenience.

Pulled, thank you.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [patch 2.6.35] WiMAX pull request
@ 2010-06-11 19:03 Inaky Perez-Gonzalez
  2010-06-11 19:39 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Inaky Perez-Gonzalez @ 2010-06-11 19:03 UTC (permalink / raw)
  To: netdev, wimax; +Cc: Inaky Perez-Gonzalez

From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>

The following changes since commit 3a24934f065d23145f1c9c70da9f630c7a37795f:
  Inaky Perez-Gonzalez (1):
        wimax/i2400m: fix bad race condition check in RX path

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax.git wimax-2.6.35.y

Patches follow for reviewing convenience.

Inaky Perez-Gonzalez (1):
      wimax/i2400m: fix missing endian correction read in fw loader

 drivers/net/wimax/i2400m/fw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 2.6.35] WiMAX pull request
  2010-06-11 19:03 Inaky Perez-Gonzalez
@ 2010-06-11 19:39 ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2010-06-11 19:39 UTC (permalink / raw)
  To: inaky; +Cc: netdev, wimax, inaky.perez-gonzalez

From: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Date: Fri, 11 Jun 2010 12:03:05 -0700

> From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
> 
> The following changes since commit 3a24934f065d23145f1c9c70da9f630c7a37795f:
>   Inaky Perez-Gonzalez (1):
>         wimax/i2400m: fix bad race condition check in RX path
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax.git wimax-2.6.35.y

Pulled, thanks a lot.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [patch 2.6.35] WiMAX pull request
@ 2010-07-23  0:15 Inaky Perez-Gonzalez
  2010-07-25  3:52 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Inaky Perez-Gonzalez @ 2010-07-23  0:15 UTC (permalink / raw)
  To: netdev, wimax; +Cc: Inaky Perez-Gonzalez

From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>

Hello David

This is a simple patch to add the USB IDs for another SKU of the Intel
6250. I understand that it might be too late to get it into 2.6.35,
but I'd like to ask if it is possible.

Thank you,

The following changes since commit a385a53e659b35ebee604889e21c40e5c336941f:
  Inaky Perez-Gonzalez (1):
        wimax/i2400m: fix missing endian correction read in fw loader

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax.git wimax-2.6.35.y

Patches follow for reviewing convenience.

Alexey Shvetsov (1):
      wimax/i2400m: Add PID & VID for Intel WiMAX 6250

 drivers/net/wimax/i2400m/i2400m-usb.h |    1 +
 drivers/net/wimax/i2400m/usb.c        |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 2.6.35] WiMAX pull request
  2010-07-23  0:15 Inaky Perez-Gonzalez
@ 2010-07-25  3:52 ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2010-07-25  3:52 UTC (permalink / raw)
  To: inaky; +Cc: netdev, wimax, inaky.perez-gonzalez

From: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Date: Thu, 22 Jul 2010 17:15:13 -0700

> The following changes since commit a385a53e659b35ebee604889e21c40e5c336941f:
>   Inaky Perez-Gonzalez (1):
>         wimax/i2400m: fix missing endian correction read in fw loader
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax.git wimax-2.6.35.y
> 
> Patches follow for reviewing convenience.
> 
> Alexey Shvetsov (1):
>       wimax/i2400m: Add PID & VID for Intel WiMAX 6250

Pulled, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-07-25  3:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-25 17:45 [patch 2.6.35] WiMAX pull request Inaky Perez-Gonzalez
2010-05-25 17:45 ` [patch 2.6.35] wimax/i2400m: fix bad race condition check in RX path Inaky Perez-Gonzalez
2010-05-25 21:05 ` [patch 2.6.35] WiMAX pull request David Miller
  -- strict thread matches above, loose matches on Subject: below --
2010-06-11 19:03 Inaky Perez-Gonzalez
2010-06-11 19:39 ` David Miller
2010-07-23  0:15 Inaky Perez-Gonzalez
2010-07-25  3:52 ` David Miller

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