Hello SCSI folks,

it seems that at least some of 4.4 series (tested 4.4.98 and 4.4.128)
is panicking upon dock power re-attach on Lenovo x201 laptop if dock
contains ATA device (SATA CD-ROM in this case). In order to reproduce
this one should unplug and re-plug back power to the dock with
installed and configured laptop-mode.

The snippet which invokes null dereference follows:

0x1b6 is in scsi_runtime_resume (drivers/scsi/scsi_pm.c:256).
251
252             dev_dbg(dev, "sdev_runtime_resume\n");
253             blk_pre_runtime_resume(sdev->request_queue);
254             if (pm && pm->runtime_resume)
255                     err = pm->runtime_resume(dev);
256             blk_post_runtime_resume(sdev->request_queue, err);
257
258             return err;
259     }
[  106.059428] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: 
Rx
[  106.060901] e1000e 0000:00:19.0 eth0: 10/100 speed: disabling TSO
[  106.062386] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  109.448678] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[  109.456826] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[  109.458347] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[  109.672878] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[  109.680977] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[  109.682458] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[  109.760126] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  114.302091] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: 
Rx
[  114.303497] e1000e 0000:00:19.0 eth0: 10/100 speed: disabling TSO
[  114.304896] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  122.008067] thinkpad_acpi: EC reports that Thermal Table has changed
[  122.047805] NMI watchdog: enabled on all CPUs, permanently consumes one 
hw-PMU counter.
[  122.062039] EXT4-fs (dm-0): re-mounted. Opts: 
stripe=32718,data=ordered,commit=0
[  122.345801] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[  122.349128] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[  122.351278] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) 
filtered out
[  122.353491] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered 
out
[  122.369140] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[  122.371335] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) 
filtered out
[  122.373578] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered 
out
[  122.375983] ------------[ cut here ]------------
[  122.375992] WARNING: CPU: 2 PID: 195 at net/core/netpoll.c:373 
netpoll_send_skb_on_dev+0x1eb/0x20a()
[  122.376014] netpoll_send_skb_on_dev(): eth0 enabled interrupts in poll 
(e1000_xmit_frame+0x0/0xc65 [e1000e])
[  122.376127] Modules linked in: configs netconsole tp_smapi(O) thinkpad_ec(O) 
ax25 ipx p8023 psnap p8022 llc ipv6 iptable_nat nf_conntrack_ipv4 
nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack xt_tcpudp iptable_filter 
ip_tables x_tables binfmt_misc qmi_wwan cdc_wdm qcserial usbnet usb_wwan mii 
usbserial i915 btusb btrtl iwldvm btbcm btintel bluetooth mac80211 
cpufreq_ondemand iTCO_wdt iTCO_vendor_support snd_hda_codec_hdmi 
snd_hda_codec_conexant snd_hda_codec_generic iwlwifi kvm_intel snd_hda_intel 
drm_kms_helper kvm snd_hda_codec cfg80211 syscopyarea sysfillrect snd_hda_core 
sysimgblt fb_sys_fops drm snd_pcm thinkpad_acpi irqbypass input_leds snd_timer 
evdev nvram snd e1000e lpc_ich i2c_i801 mfd_core shpchp acpi_cpufreq soundcore 
wmi thermal tpm_tis rfkill tpm ac intel_agp battery video intel_gtt processor 
button bonding vxlan ip6_udp_tunnel udp_tunnel macvlan igb ptp pps_core 
i2c_algo_bit dca i2c_core e1000 msdos fat configfs cramfs squashfs fuse f2fs 
zfs(PO) zunicode(PO) icp(PO) zcommon(PO) znvpair(PO) spl(O) zavl(PO) xfs nfs 
lockd grace sunrpc fscache jfs btrfs ext2 multipath linear raid10 raid1 raid0 
dm_zero dm_verity dm_thin_pool dm_switch dm_snapshot dm_raid raid456 
async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq 
dm_mirror dm_region_hash dm_log_writes dm_log_userspace dm_log dm_flakey dm_era 
dm_delay dm_cache_smq dm_cache dm_persistent_data dm_bufio dm_bio_prison 
firewire_core hid_sunplus hid_sony led_class hid_samsung hid_pl hid_petalynx 
hid_monterey hid_microsoft hid_logitech_dj hid_logitech ff_memless hid_gyration 
hid_ezkey hid_cypress hid_chicony hid_cherry hid_belkin hid_apple hid_a4tech 
hid_generic xhci_pci xhci_hcd ohci_hcd uhci_hcd usb_storage ehci_pci ehci_hcd 
sr_mod cdrom sg pata_oldpiix pata_mpiix virtio_mmio virtio_pci virtio_input 
virtio_balloon virtio_ring virtio
[  122.376209] CPU: 2 PID: 195 Comm: scsi_eh_0 Tainted: P           O    
4.4.128 #22
[  122.376210] Hardware name: LENOVO 3113AH5/3113AH5, BIOS 6QET70WW (1.40 ) 
10/11/2012
[  122.376214]  0000000000000000 5979bd0b3e374d72 ffff8800a9d1b510 
ffffffff81333b0c
[  122.376217]  ffff8800a9d1b558 0000000000000175 ffff8800a9d1b548 
ffffffff810d617b
[  122.376219]  ffffffff8152b77d ffff8800b4e16600 ffff88022ec05000 
ffff88022e820000
[  122.376220] Call Trace:
[  122.376229]  [<ffffffff81333b0c>] dump_stack+0x61/0x7e
[  122.376234]  [<ffffffff810d617b>] warn_slowpath_common+0x99/0xb2
[  122.376237]  [<ffffffff8152b77d>] ? netpoll_send_skb_on_dev+0x1eb/0x20a
[  122.376239]  [<ffffffff810d61eb>] warn_slowpath_fmt+0x57/0x73
[  122.376242]  [<ffffffff8152b345>] ? netpoll_start_xmit+0x14c/0x174
[  122.376255]  [<ffffffffa0b15de4>] ? e1000e_update_tdt_wa+0x91/0x91 [e1000e]
[  122.376258]  [<ffffffff8152b77d>] netpoll_send_skb_on_dev+0x1eb/0x20a
[  122.376261]  [<ffffffff8152c619>] netpoll_send_udp+0x3db/0x3f4
[  122.376266]  [<ffffffffa015e9ef>] write_msg+0xb5/0xe0 [netconsole]
[  122.376270]  [<ffffffff8110f82f>] 
call_console_drivers.constprop.14+0xf6/0x10b
[  122.376273]  [<ffffffff81110f9c>] console_unlock+0x34c/0x3f7
[  122.376276]  [<ffffffff8111139a>] vprintk_emit+0x353/0x37f
[  122.376278]  [<ffffffff811113e3>] vprintk+0x1d/0x1f
[  122.376280]  [<ffffffff811113f3>] vprintk_default+0xe/0x10
[  122.376284]  [<ffffffff811842cf>] printk+0x57/0x73
[  122.376288]  [<ffffffff81455fa3>] ata_dev_printk+0x6c/0x88
[  122.376292]  [<ffffffff81469cf1>] ata_acpi_run_tf+0x30d/0x347
[  122.376296]  [<ffffffff81469dea>] ? ata_dev_get_GTF+0x91/0x1b7
[  122.376299]  [<ffffffff8146a615>] ata_acpi_on_devcfg+0x182/0x283
[  122.376302]  [<ffffffff814589d8>] ata_dev_configure+0x2b5/0xfce
[  122.376306]  [<ffffffff81459a98>] ata_dev_revalidate+0x9c/0x18b
[  122.376308]  [<ffffffff81459a98>] ? ata_dev_revalidate+0x9c/0x18b
[  122.376311]  [<ffffffff8145a1a4>] ata_do_set_mode+0x61d/0x7b8
[  122.376314]  [<ffffffff810e968a>] ? insert_work+0x86/0x90
[  122.376317]  [<ffffffff814626f9>] ata_set_mode+0x72/0xef
[  122.376319]  [<ffffffff814634ef>] ata_eh_recover+0xd3f/0xfe7
[  122.376323]  [<ffffffff8146ce3e>] ? ahci_pmp_attach+0x68/0x68
[  122.376326]  [<ffffffff8146d0ce>] ? ahci_dev_classify+0x70/0x70
[  122.376328]  [<ffffffff8146e2ad>] ? ahci_do_softreset+0x1ff/0x1ff
[  122.376330]  [<ffffffff8145a525>] ? ata_phys_link_offline+0x51/0x51
[  122.376334]  [<ffffffff8145edeb>] ? ata_scsi_queuecmd+0x207/0x214
[  122.376337]  [<ffffffff81468809>] sata_pmp_error_handler+0x10f/0x802
[  122.376342]  [<ffffffff8139b6ec>] ? acpi_os_signal_semaphore+0x2c/0x37
[  122.376345]  [<ffffffff813c90aa>] ? acpi_ut_release_mutex+0x5d/0x62
[  122.376349]  [<ffffffff8146ccf3>] ? ahci_pmp_detach+0x3a/0x68
[  122.376352]  [<ffffffff8146d3e2>] ahci_error_handler+0x38/0x5b
[  122.376354]  [<ffffffff81463a69>] ata_scsi_port_error_handler+0x229/0x56e
[  122.376361]  [<ffffffff8143b7b1>] ? scsi_eh_get_sense+0x19e/0x19e
[  122.376363]  [<ffffffff81463e4e>] ata_scsi_error+0xa0/0xd6
[  122.376366]  [<ffffffff8143b904>] scsi_error_handler+0x153/0x75b
[  122.376370]  [<ffffffff815b4e08>] ? __schedule+0x5a6/0x5db
[  122.376372]  [<ffffffff8143b7b1>] ? scsi_eh_get_sense+0x19e/0x19e
[  122.376377]  [<ffffffff810ef695>] kthread+0xee/0xf6
[  122.376380]  [<ffffffff810ef5a7>] ? kthread_worker_fn+0x14f/0x14f
[  122.376384]  [<ffffffff815b8435>] ret_from_fork+0x55/0x80
[  122.376387]  [<ffffffff810ef5a7>] ? kthread_worker_fn+0x14f/0x14f
[  122.376389] ---[ end trace 0698b95896adfa5a ]---
[  122.502000] ata1.00: configured for UDMA/133
[  122.515775] sd 0:0:0:0: [sda] Starting disk
[  122.517638] BUG: unable to handle kernel NULL pointer dereference at         
  (null)
[  122.519014] IP: [<          (null)>]           (null)
[  122.520610] PGD 800000022e862067 PUD 231701067 PMD 0 
[  122.522063] Oops: 0010 [#1] SMP 
[  122.523665] Modules linked in: configs netconsole tp_smapi(O) thinkpad_ec(O) 
ax25 ipx p8023 psnap p8022 llc ipv6 iptable_nat nf_conntrack_ipv4 
nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack xt_tcpudp iptable_filter 
ip_tables x_tables binfmt_misc qmi_wwan cdc_wdm qcserial usbnet usb_wwan mii 
usbserial i915 btusb btrtl iwldvm btbcm btintel bluetooth mac80211 
cpufreq_ondemand iTCO_wdt iTCO_vendor_support snd_hda_codec_hdmi 
snd_hda_codec_conexant snd_hda_codec_generic iwlwifi kvm_intel snd_hda_intel 
drm_kms_helper kvm snd_hda_codec cfg80211 syscopyarea sysfillrect snd_hda_core 
sysimgblt fb_sys_fops drm snd_pcm thinkpad_acpi irqbypass input_leds snd_timer 
evdev nvram snd e1000e lpc_ich i2c_i801 mfd_core shpchp acpi_cpufreq soundcore 
wmi thermal tpm_tis rfkill tpm ac intel_agp battery video intel_gtt processor 
button bonding vxlan ip6_udp_tunnel udp_tunnel macvlan igb ptp pps_core 
i2c_algo_bit dca i2c_core e1000 msdos fat configfs cramfs squashfs fuse f2fs 
zfs(PO) zunicode(PO) icp(PO) zcommon(PO) znvpair(PO) spl(O) zavl(PO) xfs nfs 
lockd grace sunrpc fscache jfs btrfs ext2 multipath linear raid10 raid1 raid0 
dm_zero dm_verity dm_thin_pool dm_switch dm_snapshot dm_raid raid456 
async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq 
dm_mirror dm_region_hash dm_log_writes dm_log_userspace dm_log dm_flakey dm_era 
dm_delay dm_cache_smq dm_cache dm_persistent_data dm_bufio dm_bio_prison 
firewire_core hid_sunplus hid_sony led_class hid_samsung hid_pl hid_petalynx 
hid_monterey hid_microsoft hid_logitech_dj hid_logitech ff_memless hid_gyration 
hid_ezkey hid_cypress hid_chicony hid_cherry hid_belkin hid_apple hid_a4tech 
hid_generic xhci_pci xhci_hcd ohci_hcd uhci_hcd usb_storage ehci_pci ehci_hcd 
sr_mod cdrom sg pata_oldpiix pata_mpiix virtio_mmio virtio_pci virtio_input 
virtio_balloon virtio_ring virtio
[  122.551662] CPU: 1 PID: 23071 Comm: laptop_mode Tainted: P        W  O    
4.4.128 #22
[  122.554469] Hardware name: LENOVO 3113AH5/3113AH5, BIOS 6QET70WW (1.40 ) 
10/11/2012
[  122.557291] task: ffff88023173d080 ti: ffff88022eeec000 task.ti: 
ffff88022eeec000
[  122.560136] RIP: 0010:[<0000000000000000>]  [<          (null)>]           
(null)
[  122.563029] RSP: 0018:ffff88022eeefc70  EFLAGS: 00010002
[  122.565912] RAX: 0000000000107a00 RBX: ffff8800a9f28000 RCX: 0000000000000000
[  122.568825] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8800a9f28000
[  122.571744] RBP: ffff88022eeefc80 R08: 00000000000185e0 R09: ffffea0008baae40
[  122.574675] R10: ffff88022eeefa40 R11: 0000000000000000 R12: 0000000000000000
[  122.577611] R13: 0000000000000000 R14: 0000000000000000 R15: ffffffff8110909f
[  122.580568] FS:  0000000001a94880(0063) GS:ffff88023bc80000(0000) 
knlGS:0000000000000000
[  122.583567] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  122.586581] CR2: 0000000000000000 CR3: 0000000220d6a000 CR4: 0000000000000670
[  122.589637] Stack:
[  122.592675]  ffffffff8130baa0 ffff8800a9f28000 ffff88022eeefca0 
ffffffff8130cbcc
[  122.595812]  ffff880231bac168 ffffffff816732e0 ffff88022eeefcc8 
ffffffff81445b86
[  122.598939]  0000000000000000 ffff880231bac218 ffff880231bac168 
ffff88022eeefcf0
[  122.602085] Call Trace:
[  122.605194]  [<ffffffff8130baa0>] ? __blk_run_queue+0x31/0x3b
[  122.608337]  [<ffffffff8130cbcc>] blk_post_runtime_resume+0x3f/0x8c
[  122.611489]  [<ffffffff81445b86>] scsi_runtime_resume+0xa3/0xac
[  122.614645]  [<ffffffff8141d416>] __rpm_callback+0x43/0x6a
[  122.617787]  [<ffffffff8141d484>] rpm_callback+0x47/0x77
[  122.620915]  [<ffffffff81445ae3>] ? scsi_autopm_put_device+0x1c/0x1c
[  122.624066]  [<ffffffff8141dcf7>] rpm_resume+0x418/0x4e8
[  122.627199]  [<ffffffff8141e952>] pm_runtime_forbid+0x3f/0x55
[  122.630336]  [<ffffffff8141ba5e>] control_store+0x92/0xb1
[  122.633470]  [<ffffffff8141079a>] dev_attr_store+0x19/0x23
[  122.636606]  [<ffffffff8124ce62>] sysfs_kf_write+0x39/0x3c
[  122.639724]  [<ffffffff8124c259>] kernfs_fop_write+0xf4/0x137
[  122.642859]  [<ffffffff811e5306>] __vfs_write+0x35/0xed
[  122.645971]  [<ffffffff812c493f>] ? apparmor_file_permission+0x18/0x1a
[  122.649096]  [<ffffffff812bb10e>] ? security_file_permission+0x30/0xa3
[  122.652218]  [<ffffffff8110ae78>] ? percpu_down_read+0x12/0x49
[  122.655325]  [<ffffffff811e5ac1>] vfs_write+0xbb/0x165
[  122.658396]  [<ffffffff811e65bc>] SyS_write+0x5d/0xac
[  122.661449]  [<ffffffff815b8025>] entry_SYSCALL_64_fastpath+0x22/0x99
[  122.664515] Code:  Bad RIP value.
[  122.667497] RIP  [<          (null)>]           (null)
[  122.670402]  RSP <ffff88022eeefc70>
[  122.673213] CR2: 0000000000000000
[  122.675939] ---[ end trace 0698b95896adfa5b ]---
[  122.678601] Kernel panic - not syncing: Fatal exception
[  122.681263] Kernel Offset: disabled
[  122.682904] Rebooting in 30 seconds..

Reply via email to