linux-stable/drivers
Ian Schram 3a33cc108d mac80211_hwsim.c: fix: BUG: unable to handle kernel NULL pointer dereference at 0000000000000370
I was looking at this out of interest, but I'm in no way familiar with
the code.

Looks to me that the error handling code in mac80211_hwsim is awkward.
Which leads to it calling ieee80211_unregister_hw even when
ieee80211_register_hw failed.

The function has a for loop where it generates all simulated radios.
when something fails, the error handling will call mac80211_hwsim_free
which frees all simulated radios who's pointer isn't zero. However the
information stored is insufficient to determine whether or not the call
to ieee80211_register_hw succeeded or not for a specific radio. The
included patch makes init_mac80211_hwsim clean up the current simulated
radio, and then calls into mac80211_hwsim_free to clean up all the
radios that did succeed.

This however doesn't explain why the rate control registration failed..
build tested this, but had some problems reproducing the original
problem.

Signed-off-by: Ian Schram <ischram@telenet.be>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 13:19:35 -07:00
..
accessibility
acpi APCI: revert another duplicated patch 2008-07-20 17:14:57 -07:00
amba
ata Merge commit 'origin/master' 2008-07-16 11:07:59 +10:00
atm Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
auxdisplay Miguel Ojeda has moved 2008-07-04 10:40:05 -07:00
base Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
block m68k: Return -ENODEV if no device is found 2008-07-20 17:24:38 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-20 17:43:29 -07:00
cdrom cdrom: revert commit 22a9189 (cdrom: use kmalloced buffers instead of buffers on stack) 2008-07-04 09:52:14 +02:00
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-20 17:43:29 -07:00
clocksource Fix printk format warning in clocksource/acpi_pm.c 2008-07-15 11:01:39 -07:00
connector
cpufreq
cpuidle
crypto crypto: ixp4xx - Select CRYPTO_AUTHENC 2008-07-13 20:12:11 +08:00
dca
dio dio: use dio_match_device() in dio_bus_match() 2008-07-20 17:24:40 -07:00
dma
edac
eisa
firewire Merge branch 'sbp2-spindown' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2008-07-15 12:39:44 -07:00
firmware Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2008-07-14 15:51:11 -07:00
gpio gpio: pca953x (i2c) handles max7310 too 2008-07-04 10:40:06 -07:00
gpu drm/radeon: fixup issue with radeon and PAT support. 2008-07-15 15:48:05 +10:00
hid Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
hwmon hwmon: (w83l786ng) Convert to a new-style i2c driver 2008-07-16 19:30:18 +02:00
i2c i2c: Convert the max6875 driver to a new-style i2c driver 2008-07-16 19:30:07 +02:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6 2008-07-17 10:55:07 -07:00
ieee1394 Merge branch 'sbp2-spindown' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2008-07-15 12:39:44 -07:00
infiniband Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
input m68k: Return -ENODEV if no device is found 2008-07-20 17:24:38 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-20 17:43:29 -07:00
leds
lguest Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
macintosh Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build 2008-07-15 15:44:51 +10:00
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-07-15 18:58:04 -07:00
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb 2008-07-20 21:14:42 -07:00
memstick
message Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-07-15 18:58:04 -07:00
mfd mfd: let asic3 use mem resource instead of bus_shift 2008-07-20 19:56:44 +02:00
misc fujitsu-laptop: depends on INPUT 2008-07-16 23:27:03 +02:00
mmc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc 2008-07-16 15:17:52 -07:00
mtd [MIPS] MTX-1 flash partition setup move to platform devices registration 2008-07-15 18:44:38 +01:00
net mac80211_hwsim.c: fix: BUG: unable to handle kernel NULL pointer dereference at 0000000000000370 2008-07-21 13:19:35 -07:00
nubus
of OpenFirmware: Include <linux/of_i2c.h> from of_i2c.c. 2008-07-12 12:10:52 -06:00
oprofile
parisc
parport
pci Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
pcmcia Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6 2008-07-17 10:55:07 -07:00
pnp PNPACPI: add support for HP vendor-specific CCSR descriptors 2008-07-16 23:27:07 +02:00
power
ps3
rapidio rapidio: fix device reference counting 2008-07-10 18:04:43 -07:00
rtc Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-07-14 16:06:58 -07:00
s390 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
sbus Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
scsi scsi_dh: Verify "dev" is a sdev before accessing it. 2008-07-16 17:54:21 -07:00
serial atmel_serial: Fix tty_port breakage 2008-07-20 17:12:37 -07:00
sh
sn
spi Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build 2008-07-15 15:44:51 +10:00
ssb Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-08 16:30:17 -07:00
tc
telephony
thermal
uio Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
usb Merge branch 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6 2008-07-14 16:54:07 -07:00
video export c2p 2008-07-20 17:24:39 -07:00
virtio
w1 w1/ds2482: Convert to a new-style driver 2008-07-16 19:30:07 +02:00
watchdog Merge commit 'origin/master' 2008-07-16 11:07:59 +10:00
xen Merge branch 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-07-14 13:43:24 -07:00
zorro zorro: use memory_read_from_buffer 2008-07-20 17:24:38 -07:00
Kconfig
Makefile gpu: re-order GPU subdirectory vs char for AGP vs DRM startup. 2008-07-21 08:42:49 +10:00