1
0
Fork 0
alistair23-linux/drivers/video
Alexey Dobriyan c43f89c208 fbdev: fix /proc/fb oops after module removal
/proc/fb is not removed during rmmod.

Steps to reproduce:

	modprobe fb
	rmmod fb
	ls /proc

BUG: unable to handle kernel paging request at ffffffffa0094370
IP: [<ffffffff802b92a1>] proc_get_inode+0x101/0x130
PGD 203067 PUD 207063 PMD 17e758067 PTE 0
Oops: 0000 [1] SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:05:02.0/resource
CPU 1
Modules linked in: nf_conntrack_irc xt_state iptable_filter ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack ip_tables x_tables vfat fat usbhid ehci_hcd uhci_hcd usbcore sr_mod cdrom [last unloaded: fb]
Pid: 21205, comm: ls Not tainted 2.6.25-rc8-mm2 #14
RIP: 0010:[<ffffffff802b92a1>]  [<ffffffff802b92a1>] proc_get_inode+0x101/0x130
RSP: 0018:ffff81017c4bfc78  EFLAGS: 00010246
RAX: 0000000000008000 RBX: ffff8101787f5470 RCX: 0000000048011ccc
RDX: ffffffffa0094320 RSI: ffff810006ad43b0 RDI: ffff81017fc2cc00
RBP: ffff81017e450300 R08: 0000000000000002 R09: ffff81017c5d1000
R10: 0000000000000000 R11: 0000000000000246 R12: ffff81016b903a28
R13: ffff81017f822020 R14: ffff81017c4bfd58 R15: ffff81017f822020
FS:  00007f08e71696f0(0000) GS:ffff81017fc06480(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffffffffa0094370 CR3: 000000017e54a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process ls (pid: 21205, threadinfo ffff81017c4be000, task ffff81017de48770)
Stack:  ffff81017c5d1000 00000000ffffffea ffff81017e450300 ffffffff802bdd1e
 ffff81017f802258 ffff81017c4bfe48 ffff81016b903a28 ffff81017f822020
 ffff81017c4bfd48 ffffffff802b9ba0 ffff81016b903a28 ffff81017f802258
Call Trace:
 [<ffffffff802bdd1e>] ? proc_lookup_de+0x8e/0x100
 [<ffffffff802b9ba0>] ? proc_root_lookup+0x20/0x60
 [<ffffffff802882a7>] ? do_lookup+0x1b7/0x210
 [<ffffffff8028883d>] ? __link_path_walk+0x53d/0x7f0
 [<ffffffff80295eb8>] ? mntput_no_expire+0x28/0x130
 [<ffffffff80288b4a>] ? path_walk+0x5a/0xc0
 [<ffffffff80288dd3>] ? do_path_lookup+0x83/0x1c0
 [<ffffffff80287785>] ? getname+0xe5/0x210
 [<ffffffff80289adb>] ? __user_walk_fd+0x4b/0x80
 [<ffffffff8028236c>] ? vfs_lstat_fd+0x2c/0x70
 [<ffffffff8028bf1e>] ? filldir+0xae/0xf0
 [<ffffffff802b92e9>] ? de_put+0x9/0x50
 [<ffffffff8029633d>] ? mnt_want_write+0x2d/0x80
 [<ffffffff8029339f>] ? touch_atime+0x1f/0x170
 [<ffffffff802b9b1d>] ? proc_root_readdir+0x7d/0xa0
 [<ffffffff802825e7>] ? sys_newlstat+0x27/0x50
 [<ffffffff8028bffb>] ? vfs_readdir+0x9b/0xd0
 [<ffffffff8028c0fe>] ? sys_getdents+0xce/0xe0
 [<ffffffff8020b39b>] ? system_call_after_swapgs+0x7b/0x80

Code: b7 83 b2 00 00 00 25 00 f0 00 00 3d 00 80 00 00 74 19 48 89 93 f0 00 00 00 48 89 df e8 39 9a fd ff 48 89 d8 48 83 c4 08 5b 5d c3 <48> 83 7a 50 00 48 c7 c0 60 16 45 80 48 c7 c2 40 17 45 80 48 0f
RIP  [<ffffffff802b92a1>] proc_get_inode+0x101/0x130
 RSP <ffff81017c4bfc78>
CR2: ffffffffa0094370
---[ end trace c71hiarjan8ab739 ]---

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
"Antonino A. Daplas" <adaplas@pol.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-15 19:35:40 -07:00
..
aty [ATYFB]: Kill 'prom_palette' sparc code. 2008-02-18 15:26:43 -08:00
backlight backlight: Add OMAP1 PWL backlight driver 2008-02-07 09:31:52 +00:00
console mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
display make drivers/video/display/display-sysfs.c:display_class static 2007-05-08 11:15:26 -07:00
geode make video/geode/lxfb_core.c:geode_modedb[] static 2008-02-06 10:41:15 -08:00
i810 i810fb: fix console switch regression 2008-03-19 18:53:36 -07:00
intelfb Remove pointless casts from void pointers 2008-02-06 10:41:01 -08:00
kyro fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
logo logo.c: get rid of mips_machgroup 2007-10-18 14:37:17 -07:00
matrox i2c: normal_i2c can be made const (remaining drivers) 2008-01-27 18:14:47 +01:00
mbx mbxfb: fix incorrect argument type 2008-03-10 18:01:20 -07:00
nvidia PM: Introduce PM_EVENT_HIBERNATE callback state 2008-02-23 10:40:04 -08:00
omap drivers/video/: Spelling fixes 2008-02-03 17:31:49 +02:00
pnx4008 define global BIT macro 2007-10-19 11:53:42 -07:00
riva Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight 2007-07-22 11:19:46 -07:00
savage fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
sis drivers/video: remove unnecessary pci_dev_put 2008-02-06 10:41:15 -08:00
vermilion vermilion.c: use ALIGN(), not __ALIGN_MASK() 2008-02-06 10:41:16 -08:00
68328fb.c 68328fb: the pseudo_palette is only 16 elements long 2007-07-17 10:23:11 -07:00
Kconfig fbdev: defio and Metronomefb 2008-03-19 18:53:37 -07:00
Makefile fbdev: defio and Metronomefb 2008-03-19 18:53:37 -07:00
acornfb.c Remove the arm26 port 2007-07-31 15:39:39 -07:00
acornfb.h
amba-clcd.c some kmalloc/memset ->kzalloc (tree wide) 2007-07-19 10:04:50 -07:00
amifb.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
arcfb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
arkfb.c vt8623fb: arkfb: null pointer dereference fix 2007-06-01 08:18:28 -07:00
asiliantfb.c
atafb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
atafb.h m68k: Atari fb revival 2007-05-04 17:59:05 -07:00
atafb_iplan2p2.c m68k: Atari fb revival 2007-05-04 17:59:05 -07:00
atafb_iplan2p4.c m68k: Atari fb revival 2007-05-04 17:59:05 -07:00
atafb_iplan2p8.c m68k: Atari fb revival 2007-05-04 17:59:05 -07:00
atafb_mfb.c m68k: Atari fb revival 2007-05-04 17:59:05 -07:00
atafb_utils.h m68k: Atari fb revival 2007-05-04 17:59:05 -07:00
atmel_lcdfb.c atmel_lcdfb: backlight control 2008-02-06 10:41:16 -08:00
au1100fb.c au1100fb: fix modpost warnings 2007-10-18 14:37:17 -07:00
au1100fb.h
au1200fb.c some kmalloc/memset ->kzalloc (tree wide) 2007-07-19 10:04:50 -07:00
au1200fb.h
bf54x-lq043fb.c blackfin video driver: fix bug when opening/reading/mmaping BF54x and BF52x framebuffer simultaneously 2008-03-28 14:45:22 -07:00
bfin-t350mcqb-fb.c blackfin video driver: fix bug when opening/reading/mmaping BF54x and BF52x framebuffer simultaneously 2008-03-28 14:45:22 -07:00
bt431.h
bt455.h
bw2.c [VIDEO]: Do not prom_halt() in cg3 and bw2 device probe. 2007-08-26 18:49:08 -07:00
c2p.c
c2p.h
cfbcopyarea.c fbdev: copyarea function taught to fully support swapped pixel order in byte 2007-10-16 09:43:23 -07:00
cfbfillrect.c fbdev: Support for byte-reversed framebuffer formats 2007-10-16 09:43:19 -07:00
cfbimgblt.c fbdev: Support for byte-reversed framebuffer formats 2007-10-16 09:43:19 -07:00
cg3.c [VIDEO]: Do not prom_halt() in cg3 and bw2 device probe. 2007-08-26 18:49:08 -07:00
cg6.c [CG6]: accelerated copyarea 2007-10-13 21:53:08 -07:00
cg14.c [SPARC]: video/cg14.c and video/sbuslib.c build fixes 2008-02-12 18:23:31 -08:00
chipsfb.c PM: Introduce PM_EVENT_HIBERNATE callback state 2008-02-23 10:40:04 -08:00
cirrusfb.c cirrusfb nonsense 2007-10-27 22:18:12 -07:00
clps711xfb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
controlfb.c controlfb: the pseudo_palette is only 16 elements long 2007-07-17 10:23:11 -07:00
controlfb.h
cyber2000fb.c [ARM] 4645/1: Cyberpro: Trivial fix to restore 16bpp mode. 2007-11-08 23:29:36 +00:00
cyber2000fb.h
cyblafb.c drivers/video/: Spelling fixes 2008-02-03 17:31:49 +02:00
dnfb.c
edid.h
efifb.c x86_64 EFI boot support: EFI frame buffer driver 2007-11-29 09:24:54 -08:00
epson1355fb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
fb_ddc.c fb_ddc: fix DDC lines quirk 2007-11-29 09:24:52 -08:00
fb_defio.c fbdev: defio and Metronomefb 2008-03-19 18:53:37 -07:00
fb_draw.h fb: fix warning: no return statement in function returning non-void 2008-02-06 10:41:21 -08:00
fb_notify.c
fb_sys_fops.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
fbcmap.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
fbcvt.c
fbmem.c fbdev: fix /proc/fb oops after module removal 2008-04-15 19:35:40 -07:00
fbmon.c fbmon: cleanup trailing whitespaces 2008-02-06 10:41:15 -08:00
fbsysfs.c fbdev: fix obvious bug in show_pan() 2007-05-08 11:15:26 -07:00
ffb.c [FFB]: source cleanup 2007-10-13 21:53:08 -07:00
fm2fb.c fm2fb: the pseudo_palette is only 16 elements long 2007-07-17 10:23:12 -07:00
g364fb.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
gbefb.c gbefb: fix section mismatch warnings 2007-11-14 18:45:42 -08:00
gxt4500.c Add missing newlines to some uses of dev_<level> messages 2007-10-18 14:37:28 -07:00
hecubafb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
hgafb.c
hitfb.c fb: hitfb: Balance probe/remove section annotations. 2008-03-06 13:56:33 +09:00
hpfb.c video/hpfb.c section fix 2008-02-06 10:41:15 -08:00
igafb.c drivers/video: add missing pci_dev_get 2008-02-06 10:41:16 -08:00
imacfb.c imacfb: remove reference to otherwise-unused, non-existent screen_info.imacpm_seg 2007-11-29 09:24:53 -08:00
imsttfb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
imxfb.c imxfb: fast read flag and nonstandard field configurable 2007-10-16 09:43:21 -07:00
imxfb.h
leo.c [VIDEO]: Fix OOPS in all SBUS framebuffer drivers. 2007-07-30 00:27:33 -07:00
macfb.c macfb: fix pseudo_palette size and overrun 2007-07-17 10:23:12 -07:00
macmodes.c drivers/video/macmodes.c:mac_find_mode() mustn't be __devinit 2007-07-17 10:23:13 -07:00
macmodes.h drivers/video/macmodes.c:mac_find_mode() mustn't be __devinit 2007-07-17 10:23:13 -07:00
maxinefb.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
metronomefb.c fbdev: defio and Metronomefb 2008-03-19 18:53:37 -07:00
modedb.c fix radeonfb regression with Xpress 200m 5955 2008-01-17 15:38:59 -08:00
neofb.c neofb: avoid overwriting fb_info fields 2008-02-06 10:41:16 -08:00
offb.c offb: the pseudo_palette is only 16 elements long 2007-07-17 10:23:12 -07:00
output.c Convert from class_device to device for drivers/video 2007-10-12 14:51:04 -07:00
p9100.c [VIDEO]: Fix OOPS in all SBUS framebuffer drivers. 2007-07-30 00:27:33 -07:00
platinumfb.c [POWERPC] Fix platinumfb framebuffer 2007-09-22 14:49:22 +10:00
platinumfb.h
pm2fb.c pm2fb: big endian fix 2008-02-06 10:41:17 -08:00
pm3fb.c drivers/video/pm3fb.c section fix 2008-02-06 10:41:16 -08:00
pmag-aa-fb.c fbcon: fix color generation for monochrome framebuffer 2008-02-06 10:41:18 -08:00
pmag-ba-fb.c drivers/video/pmag-ba-fb.c: improve diagnostics 2007-10-16 09:43:19 -07:00
pmagb-b-fb.c pmagb-b-fb: improve diagnostics 2007-10-16 09:43:20 -07:00
ps3fb.c ps3fb: fix modedb typos 2008-02-06 10:41:17 -08:00
pvr2fb.c fb: pvr2fb: Fix up remaining section mismatch. 2008-03-06 13:39:18 +09:00
pxafb.c [ARM] 4828/1: fix 3 warnings in drivers/video/pxafb.c 2008-02-17 10:42:09 +00:00
pxafb.h pxafb: Add support for other palette formats 2007-10-16 09:43:15 -07:00
q40fb.c q40fb: the pseudo_palette is only 16 elements long 2007-07-17 10:23:12 -07:00
s1d13xxxfb.c drivers/video/s1d13xxxfb.c: fix build as module with dbg 2007-11-14 18:45:38 -08:00
s3c2410fb.c FB/S3C2410: check default_display parameter passed in platform data 2008-02-06 10:41:18 -08:00
s3c2410fb.h FB/S3C2412: add S3C2412 support to S3C2410 fb driver 2008-02-06 10:41:17 -08:00
s3fb.c s3fb: do not allow incorrect pixclock settings 2007-10-16 09:43:23 -07:00
sa1100fb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
sa1100fb.h [PATCH] Replace regular code with appropriate calls to container_of() 2007-02-11 11:18:06 -08:00
sbuslib.c [SPARC]: video/cg14.c and video/sbuslib.c build fixes 2008-02-12 18:23:31 -08:00
sbuslib.h
sgivwfb.c sgivwfb: the pseudo_palette is only 16 elements long 2007-07-17 10:23:12 -07:00
skeletonfb.c skeletonfb: wrong field name fix 2007-10-16 09:43:14 -07:00
sm501fb.c sm501fb: fix timing limits 2008-03-04 16:35:13 -08:00
sstfb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
sticore.h
stifb.c stifb: fix crash A1439A CRX (Rattler) graphics card 2008-03-10 18:01:20 -07:00
sunxvr500.c [VIDEO] sunxvr500fb: Fix pseudo_palette array size 2007-06-05 13:15:26 -07:00
sunxvr2500.c [VIDEO] sunxvr2500fb: Fix pseudo_palette array size 2007-06-05 13:15:01 -07:00
svgalib.c svgalib: mode selection updates 2007-10-16 09:43:22 -07:00
syscopyarea.c fbdev: consolidate common drawing functions into a header file 2007-05-08 11:15:30 -07:00
sysfillrect.c fbdev: consolidate common drawing functions into a header file 2007-05-08 11:15:30 -07:00
sysimgblt.c fbdev: add drawing functions for framebuffers in system RAM 2007-05-08 11:15:30 -07:00
tcx.c [VIDEO]: Fix OOPS in all SBUS framebuffer drivers. 2007-07-30 00:27:33 -07:00
tdfxfb.c tdfxfb: fix section mismatch warnings 2008-02-06 10:41:16 -08:00
tgafb.c tgafb: remove a redundant non-mono test in mono imageblit 2007-10-16 09:43:23 -07:00
tridentfb.c tridentfb: fix memory size detection 2008-03-10 18:01:18 -07:00
uvesafb.c drivers/video/uvesafb.c: fix section mismatch warning in param_set_scroll() 2008-02-23 17:12:15 -08:00
valkyriefb.c some kmalloc/memset ->kzalloc (tree wide) 2007-07-19 10:04:50 -07:00
valkyriefb.h
vesafb.c
vfb.c vfb: make virtual framebuffer mmapable 2007-10-16 09:43:18 -07:00
vga16fb.c Remove magic macros for screen_info structure members 2007-10-16 22:57:17 -07:00
vgastate.c vga: vgastate fix 2007-05-08 11:15:32 -07:00
vt8623fb.c vt8623fb.c: make code static 2007-07-17 10:23:13 -07:00
w100fb.c w100fb: fix compile warnings 2007-05-23 20:14:13 -07:00
w100fb.h
xilinxfb.c [POWERPC] Xilinx: Update compatible to use values generated by BSP generator. 2008-02-06 10:23:21 -07:00