linux-uconsole/drivers
Chris Wilson 409fab53ed drm: Return ENODEV if the inode mapping changes
commit da58405860 upstream.

Replace a BUG_ON with an error code in the event that the inode mapping
changes between calls to drm_open. This may happen for instance if udev
is loaded subsequent to the original opening of the device:

[  644.291870] kernel BUG at drivers/gpu/drm/drm_fops.c:146!
[  644.291876] invalid opcode: 0000 [#1] SMP
[  644.291882] last sysfs file: /sys/kernel/uevent_seqnum
[  644.291888]
[  644.291895] Pid: 7276, comm: lt-cairo-test-s Not tainted 2.6.34-rc1 #2 N150/N210/N220             /N150/N210/N220
[  644.291903] EIP: 0060:[<c11c70e3>] EFLAGS: 00210283 CPU: 0
[  644.291912] EIP is at drm_open+0x4b1/0x4e2
[  644.291918] EAX: f72d8d18 EBX: f790a400 ECX: f73176b8 EDX: 00000000
[  644.291923] ESI: f790a414 EDI: f790a414 EBP: f647ae20 ESP: f647adfc
[  644.291929]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  644.291937] Process lt-cairo-test-s (pid: 7276, ti=f647a000 task=f73f5c80 task.ti=f647a000)
[  644.291941] Stack:
[  644.291945]  00000000 f7bb7400 00000080 f6451100 f73176b8 f6479214 f6451100 f73176b8
[  644.291957] <0> c1297ce0 f647ae34 c11c6c04 f73176b8 f7949800 00000000 f647ae54 c1080ac5
[  644.291969] <0> f7949800 f6451100 00000000 f6451100 f73176b8 f6452780 f647ae70 c107d1e6
[  644.291982] Call Trace:
[  644.291991]  [<c11c6c04>] ? drm_stub_open+0x8a/0xb8
[  644.292000]  [<c1080ac5>] ? chrdev_open+0xef/0x106
[  644.292008]  [<c107d1e6>] ? __dentry_open+0xd4/0x1a6
[  644.292015]  [<c107d35b>] ? nameidata_to_filp+0x31/0x45
[  644.292022]  [<c10809d6>] ? chrdev_open+0x0/0x106
[  644.292030]  [<c10864e2>] ? do_last+0x346/0x423
[  644.292037]  [<c108789f>] ? do_filp_open+0x190/0x415
[  644.292046]  [<c1071eb5>] ? handle_mm_fault+0x214/0x710
[  644.292053]  [<c107d008>] ? do_sys_open+0x4d/0xe9
[  644.292061]  [<c1016462>] ? do_page_fault+0x211/0x23f
[  644.292068]  [<c107d0f0>] ? sys_open+0x23/0x2b
[  644.292075]  [<c1002650>] ? sysenter_do_call+0x12/0x26
[  644.292079] Code: 89 f0 89 55 dc e8 8d 96 0a 00 8b 45 e0 8b 55 dc 83 78 04 01 75 28 8b 83 18 02 00 00 85 c0 74 0f 8b 4d ec 3b 81 ac 00 00 00 74 13 <0f> 0b eb fe 8b 4d ec 8b 81 ac 00 00 00 89 83 18 02 00 00 89 f0
[  644.292143] EIP: [<c11c70e3>] drm_open+0x4b1/0x4e2 SS:ESP 0068:f647adfc
[  644.292175] ---[ end trace 2ddd476af89a60fa ]---

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-26 07:41:14 -07:00
..
accessibility
acpi ACPI: Be in TS_POLLING state during mwait based C-state entry 2010-03-15 08:49:36 -07:00
amba
ata ahci: use BIOS date in broken_suspend list 2010-04-01 15:58:54 -07:00
atm
auxdisplay
base Driver-Core: devtmpfs - reset inode permissions before unlinking 2010-03-15 08:49:53 -07:00
block cciss: Make cciss_seq_show handle holes in the h->drv[] array 2010-02-23 07:37:49 -08:00
bluetooth Bluetooth: Prevent ill-timed autosuspend in USB driver 2010-01-06 15:03:43 -08:00
cdrom
char tty: Keep the default buffering to sub-page units 2010-04-01 15:58:30 -07:00
clocksource clocksource: Fix up a registration/IRQ race in the sh drivers. 2010-03-15 08:49:44 -07:00
connector connector: Delete buggy notification code. 2010-02-09 04:50:59 -08:00
cpufreq [CPUFREQ] Fix stale cpufreq_cpu_governor pointer 2009-11-17 23:15:04 -05:00
cpuidle drivers/cpuidle/governors/menu.c: fix undefined reference to `__udivdi3' 2010-01-18 10:19:31 -08:00
crypto crypto: padlock-sha - Add import/export support 2010-02-23 07:37:54 -08:00
dca
dio
dma ioat: fix infinite timeout checking in ioat2_quiesce 2010-02-23 07:37:49 -08:00
edac edac, mce: Filter out invalid values 2010-04-01 15:58:40 -07:00
eisa
firewire firewire: core: add_descriptor size check 2010-02-09 04:50:52 -08:00
firmware DMI: allow omitting ident strings in DMI tables 2010-01-28 15:01:52 -08:00
gpio gpiolib: Actually set output state in wm831x_gpio_direction_output() 2010-03-15 08:49:57 -07:00
gpu drm: Return ENODEV if the inode mapping changes 2010-04-26 07:41:14 -07:00
hid HID: usbhid: introduce timeout for stuck ctrl/out URBs 2010-03-15 08:49:37 -07:00
hwmon hwmon: (coretemp) Add missing newline to dev_warn() message 2010-04-01 15:58:48 -07:00
i2c i2c-i801: Don't use the block buffer for I2C block writes 2010-04-01 15:58:07 -07:00
ide slc90e66: fix UDMA handling 2009-12-18 14:05:04 -08:00
idle
ieee1394
ieee802154 ieee802154: dont leak skbs in ieee802154_fake_xmit() 2009-11-19 13:16:21 -08:00
infiniband Fix failure exit in ipathfs 2010-02-09 04:50:48 -08:00
input Input: wacom - ensure the device is initialized properly upon resume 2010-04-01 15:58:17 -07:00
isdn gigaset: prune use of tty_buffer_request_room 2010-04-01 15:58:24 -07:00
leds leds-gpio: fix default state handling on OF platforms 2010-04-01 15:58:53 -07:00
lguest lguest: fix bug in setting guest GDT entry 2010-01-06 15:05:19 -08:00
macintosh macintosh/therm_adt746x: Fix sysfs attributes lifetime 2010-03-15 08:49:46 -07:00
mca
md dm: free dm_io before bio_endio not after 2010-03-15 08:50:14 -07:00
media V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() 2010-04-01 15:58:13 -07:00
memstick
message SCSI: mptfusion : mptscsih_abort return value should be SUCCESS instead of value 0. 2010-02-23 07:37:55 -08:00
mfd mfd: WM835x GPIO direction register is not locked 2010-01-22 15:18:18 -08:00
misc SCSI: enclosure: fix oops while iterating enclosure_status array 2010-01-25 10:49:37 -08:00
mmc s3cmci: initialize default platform data no_wprotect and no_detect with 1 2010-04-01 15:58:56 -07:00
mtd UBI: fix volume creation input checking 2010-02-09 04:50:45 -08:00
net b43: Workaround circular locking in hw-tkip key update callback 2010-04-01 15:58:55 -07:00
nubus
of of: Remove nested function 2009-10-15 09:58:27 -06:00
oprofile
parisc
parport
pci PCI: cleanup error return for pcix get and set mmrbc functions 2010-04-01 15:58:45 -07:00
pcmcia PCI/cardbus: Add a fixup hook and fix powerpc 2010-01-22 15:18:26 -08:00
platform thinkpad-acpi: fix bluetooth/wwan resume 2010-03-15 08:50:04 -07:00
pnp
power
pps pps: events reporting fix up 2009-11-12 07:26:01 -08:00
ps3
rapidio
regulator regulator: Fix display of null constraints for regulators 2010-02-23 07:37:49 -08:00
rtc rtc-coh901331: fix braces in resume code 2010-03-15 08:50:14 -07:00
s390 dasd: remove strings from s390dbf 2010-02-23 07:37:54 -08:00
sbus
scsi SCSI: scsi_transport_fc: Fix synchronization issue while deleting vport 2010-04-01 15:58:28 -07:00
serial serial: imx: fix NULL dereference Oops when pdata == NULL 2010-03-15 08:49:54 -07:00
sfi
sh
sn
spi SPI: spi_txx9: Fix bit rate calculation 2009-12-02 23:58:32 +00:00
ssb ssb: Fix range check in sprom write 2009-12-18 14:03:24 -08:00
staging rt2860sta: Fix argument to linux_pci_unmap_single() 2010-04-01 15:58:46 -07:00
tc
telephony
thermal acpi: thermal: Add EOL to the trip_point_N_type strings 2009-11-05 17:33:24 -05:00
uio uio: pm_runtime_disable is needed if failed 2009-11-13 11:36:00 +09:00
usb usb: r8a66597-hcd: fix removed from an attached hub 2010-04-01 15:58:36 -07:00
uwb
video efifb: fix framebuffer handoff 2010-04-01 15:58:13 -07:00
virtio virtio: fix out of range array access 2010-04-01 15:58:18 -07:00
vlynq
w1
watchdog bfin: fix max timeout calculation 2010-03-15 08:49:32 -07:00
xen xen: fix hang on suspend. 2010-01-18 10:19:44 -08:00
zorro
Kconfig
Makefile