2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-16 09:34:22 +08:00
linux-next/drivers/net/wimax/i2400m
Prasanna S. Panchamukhi d11a6e4495 wimax i2400m: fix race condition while accessing rx_roq by using kref count
This patch fixes the race condition when one thread tries to destroy
the memory allocated for rx_roq, while another thread still happen
to access rx_roq.
Such a race condition occurs when i2400m-sdio kernel module gets
unloaded, destroying the memory allocated for rx_roq while rx_roq
is accessed by i2400m_rx_edata(), as explained below:
$thread1                                $thread2
$ void i2400m_rx_edata()                $
$Access rx_roq[]                        $
$roq = &i2400m->rx_roq[ro_cin]          $
$ i2400m_roq_[reset/queue/update_ws]    $
$                                       $ void i2400m_rx_release();
$                                       $kfree(rx->roq);
$                                       $rx->roq = NULL;
$Oops! rx_roq is NULL

This patch fixes the race condition using refcount approach.

Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
2010-05-11 14:08:23 -07:00
..
control.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
debug-levels.h
debugfs.c wimax/i2400m: introduce i2400m_reset(), stopping TX and carrier 2009-11-03 12:49:36 -08:00
driver.c wimax/i2400m: Correct the error path handlers order in i2400m_post_reset() 2010-05-11 14:05:47 -07:00
fw.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
i2400m-sdio.h wimax/i2400m: fix the race condition for accessing TX queue 2010-05-11 14:04:46 -07:00
i2400m-usb.h wimax/i2400m: Add support for more i6x50 SKUs 2010-01-21 16:49:24 -08:00
i2400m.h wimax i2400m: fix race condition while accessing rx_roq by using kref count 2010-05-11 14:08:23 -07:00
Kconfig i2400m-sdio: select IWMC3200TOP in Kconfig 2009-10-19 23:22:51 -07:00
Makefile
netdev.c wimax/i2400m: increase tx queue length from 5 to 20 [v1] 2010-05-11 14:08:12 -07:00
op-rfkill.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
rx.c wimax i2400m: fix race condition while accessing rx_roq by using kref count 2010-05-11 14:08:23 -07:00
sdio-debug-levels.h
sdio-fw.c wimax/i2400m: be smarter about copying command buffer to bm_cmd_buf 2009-10-19 15:55:46 +09:00
sdio-rx.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sdio-tx.c wimax/i2400m: add the error recovery mechanism on TX path 2010-05-11 14:05:39 -07:00
sdio.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sysfs.c
tx.c wimax/i2400m: fix system freeze caused by an infinite loop [v1] 2010-05-11 14:06:36 -07:00
usb-debug-levels.h
usb-fw.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
usb-notif.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
usb-rx.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
usb-tx.c wimax/i2400m: handle USB stalls 2009-11-03 12:49:40 -08:00
usb.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00