Hi folks, Philip (CCed) discovered an OOPS during our testing. I narrowed it down to the following three commands as a reduced test case: mkdir /sys/kernel/config/target/core/iblock_0 mkdir /sys/kernel/config/target/core/iblock_0/test echo 1 > /sys/kernel/config/target/core/iblock_0/test/alua/default_tg_pt_gp/alua_access_state This appears to happen on target_core_alua.c:1166 when core_alua_do_port_transition() attempts to take the lu_gp_mem_lock. If I'm reading the code right, the ALUA structures are only allocated in target_configure_device(), which happens when the TCM LUN is enabled. core_alua_do_port_transition() should probably check for dev->dev_flags |= DF_CONFIGURED before doing anything. Full OOPS output below: [687826.010278] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [687826.018293] IP: [<ffffffff814f1135>] _raw_spin_lock+0x5/0x30 [687826.024097] PGD 85d558067 PUD 84901c067 PMD 0 [687826.028720] Oops: 0002 [#1] SMP [687826.032104] Modules linked in: ip6table_filter ip6_tables iptable_filter ip_tables x_tables dm_mirror dm_region_hash dm_log target_core_pscsi target_core_file target_core_iblock tcm_fc libfc tcm_loop tcm_qla2xxx qla2xxx scsi_transport_fc scsi_tgt iscsi_target_mod ib_srpt ib_cm ib_sa ib_mad ib_core ib_addr target_core_mod hmac configfs drbd lru_cache libcrc32c loop sha1_ssse3 ipmi_poweroff ipmi_devintf x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel iTCO_wdt iTCO_vendor_support aesni_intel mxm_wmi aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd sb_edac pcspkr edac_core joydev i2c_i801 evdev lpc_ich mei_me mfd_core mei ioatdma ipmi_si tpm_tis tpm ipmi_msghandler wmi processor thermal_sys button ext4 crc16 mbcache jbd2 dm_mod hid_generic usbhid hid sg sd_mod ses crc_t10dif crct10dif_common enclosure isci ahci libsas libahci ehci_pci ehci_hcd sfc libata igb mtd i2c_algo_bit usbcore scsi_transport_sas i2c_core dca usb_common ptp megaraid_sas scsi_mod mdio pps_core [687826.127297] CPU: 2 PID: 14347 Comm: bash Not tainted 3.14-0.bpo.1-amd64 #1 Debian 3.14.4-1~bpo70+1 [687826.136383] Hardware name: Supermicro X9DR3-F/X9DR3-F, BIOS 3.0a 07/31/2013 [687826.143462] task: ffff88083e800a60 ti: ffff88083e802000 task.ti: ffff88083e802000 [687826.151076] RIP: 0010:[<ffffffff814f1135>] [<ffffffff814f1135>] _raw_spin_lock+0x5/0x30 [687826.159318] RSP: 0018:ffff88083e803de0 EFLAGS: 00010246 [687826.164747] RAX: 0000000000010000 RBX: ffff880853690e28 RCX: 0000000000000000 [687826.172015] RDX: ffff88083e803e44 RSI: 0000000000000002 RDI: 0000000000000008 [687826.179284] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 [687826.186544] R10: 000000000000000a R11: f000000000000000 R12: 0000000000000002 [687826.193812] R13: ffff880853c48000 R14: ffffffffffffffea R15: 0000000000000002 [687826.201082] FS: 00007f111e230700(0000) GS:ffff88087fc40000(0000) knlGS:0000000000000000 [687826.209302] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [687826.215165] CR2: 0000000000000008 CR3: 000000084c93e000 CR4: 00000000001407e0 [687826.222425] Stack: [687826.224550] ffffffffa0427e88 ffff88085d8bbae0 ffff88084d836450 ffff88087fffbd80 [687826.232166] 000000017c623080 0000000000000000 ffffffea00000000 ffff88087c623080 [687826.239781] ffff88083e803f34 0000000000000000 0000000000000000 ffff880853c48000 [687826.247396] Call Trace: [687826.249971] [<ffffffffa0427e88>] ? core_alua_do_port_transition+0x58/0x240 [target_core_mod] [687826.258627] [<ffffffffa04195d8>] ? target_core_alua_tg_pt_gp_store_attr_alua_access_state+0x78/0x110 [target_core_mod] [687826.269544] [<ffffffffa032474d>] ? configfs_write_file+0xbd/0x130 [configfs] [687826.276815] [<ffffffff81198026>] ? vfs_write+0xc6/0x1f0 [687826.282242] [<ffffffff8119851b>] ? SyS_write+0x4b/0xb0 [687826.287586] [<ffffffff814f9779>] ? system_call_fastpath+0x16/0x1b [687826.293878] Code: 84 00 00 00 00 00 9c 58 0f 1f 44 00 00 48 89 c2 fa 66 0f 1f 44 00 00 f0 ff 0f 79 05 e8 65 31 db ff 48 89 d0 c3 90 b8 00 00 01 00 <f0> 0f c1 07 89 c2 c1 ea 10 66 39 c2 75 03 c3 f3 90 0f b7 07 66 [687826.314530] RIP [<ffffffff814f1135>] _raw_spin_lock+0x5/0x30 [687826.320410] RSP <ffff88083e803de0> [687826.324011] CR2: 0000000000000008 [687826.327857] ---[ end trace d829085812a4c21f ]--- Regards, Chris -- Chris Boot Tiger Computing Ltd "Linux for Business" Tel: 01600 483 484 Web: http://www.tiger-computing.co.uk Follow us on Facebook: http://www.facebook.com/TigerComputing Registered in England. Company number: 3389961 Registered address: Wyastone Business Park, Wyastone Leys, Monmouth, NP25 3SR -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html