mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
fbc3edf7d7
The 0day bot reports the below failure which happens occasionally, with their randconfig testing (once every ~100 boots). The Code points at the private pointer ->driver_data being NULL, which hints at a race of sorts where the private driver_data descriptor has disappeared by the time we get to run the workqueue. So let's check that pointer before we continue with issuing the command to the drive. This fix is of the brown paper bag nature but considering that IDE is long deprecated, let's do that so that random testing which happens to enable CONFIG_IDE during randconfig builds, doesn't fail because of this. Besides, failing the TEST_UNIT_READY command because the drive private data is gone is something which we could simply do anyway, to denote that there was a problem communicating with the device. BUG: unable to handle kernel NULL pointer dereference at 000001c0 IP: cdrom_check_status *pde = 00000000 Oops: 0000 [#1] SMP CPU: 1 PID: 155 Comm: kworker/1:2 Not tainted 4.14.0-rc8 #127 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 Workqueue: events_freezable_power_ disk_events_workfn task: 4fe90980 task.stack: 507ac000 EIP: cdrom_check_status+0x2c/0x90 EFLAGS: 00210246 CPU: 1 EAX: 00000000 EBX: 4fefec00 ECX: 00000000 EDX: 00000000 ESI: 00000003 EDI: ffffffff EBP: 467a9340 ESP: 507aded0 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 CR0: 80050033 CR2: 000001c0 CR3: 06e0f000 CR4: 00000690 Call Trace: ? ide_cdrom_check_events_real ? cdrom_check_events ? disk_check_events ? process_one_work ? process_one_work ? worker_thread ? kthread ? process_one_work ? __kthread_create_on_node ? ret_from_fork Code: 53 83 ec 14 89 c3 89 d1 be 03 00 00 00 65 a1 14 00 00 00 89 44 24 10 31 c0 8b 43 18 c7 44 24 04 00 00 00 00 c7 04 24 00 00 00 00 <8a> 80 c0 01 00 00 c7 44 24 08 00 00 00 00 83 e0 03 c7 44 24 0c EIP: cdrom_check_status+0x2c/0x90 SS:ESP: 0068:507aded0 CR2: 00000000000001c0 ---[ end trace 2410e586dd8f88b2 ]--- Reported-and-tested-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jens Axboe <axboe@kernel.dk> Cc: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
---|---|---|
.. | ||
aec62xx.c | ||
ali14xx.c | ||
alim15x3.c | ||
amd74xx.c | ||
atiixp.c | ||
au1xxx-ide.c | ||
buddha.c | ||
cmd64x.c | ||
cmd640.c | ||
cs5520.c | ||
cs5530.c | ||
cs5535.c | ||
cs5536.c | ||
cy82c693.c | ||
delkin_cb.c | ||
dtc2278.c | ||
falconide.c | ||
gayle.c | ||
hpt366.c | ||
ht6560b.c | ||
icside.c | ||
ide_platform.c | ||
ide-4drives.c | ||
ide-acpi.c | ||
ide-atapi.c | ||
ide-cd_ioctl.c | ||
ide-cd_verbose.c | ||
ide-cd.c | ||
ide-cd.h | ||
ide-cs.c | ||
ide-devsets.c | ||
ide-disk_ioctl.c | ||
ide-disk_proc.c | ||
ide-disk.c | ||
ide-disk.h | ||
ide-dma-sff.c | ||
ide-dma.c | ||
ide-eh.c | ||
ide-floppy_ioctl.c | ||
ide-floppy_proc.c | ||
ide-floppy.c | ||
ide-floppy.h | ||
ide-gd.c | ||
ide-gd.h | ||
ide-generic.c | ||
ide-io-std.c | ||
ide-io.c | ||
ide-ioctls.c | ||
ide-iops.c | ||
ide-legacy.c | ||
ide-lib.c | ||
ide-park.c | ||
ide-pci-generic.c | ||
ide-pio-blacklist.c | ||
ide-pm.c | ||
ide-pnp.c | ||
ide-probe.c | ||
ide-proc.c | ||
ide-scan-pci.c | ||
ide-sysfs.c | ||
ide-tape.c | ||
ide-taskfile.c | ||
ide-timings.c | ||
ide-xfer-mode.c | ||
ide.c | ||
it821x.c | ||
it8172.c | ||
it8213.c | ||
jmicron.c | ||
Kconfig | ||
macide.c | ||
Makefile | ||
ns87415.c | ||
opti621.c | ||
palm_bk3710.c | ||
pdc202xx_new.c | ||
pdc202xx_old.c | ||
piix.c | ||
pmac.c | ||
q40ide.c | ||
qd65xx.c | ||
qd65xx.h | ||
rapide.c | ||
rz1000.c | ||
sc1200.c | ||
serverworks.c | ||
setup-pci.c | ||
sgiioc4.c | ||
siimage.c | ||
sis5513.c | ||
sl82c105.c | ||
slc90e66.c | ||
tc86c001.c | ||
triflex.c | ||
trm290.c | ||
tx4938ide.c | ||
tx4939ide.c | ||
umc8672.c | ||
via82cxxx.c |