[Revert commit 27f58c04a8f438078583041468ec60597841284d] [linux-next] [6.9.0-rc1-next-20240328] WARNING: CPU: 9 PID: 209 at drivers/scsi/sg.c:2236 sg_remove_sfp_usercontext+0x270/0x280 [sg]

From: Venkat Rao Bagalkote
Date: Tue Apr 02 2024 - 09:54:36 EST


Greetings!!


Below warnings is observed with the commit 27f58c04a8f438078583041468ec60597841284d.


Once reverting the above commit id, issue is resloved.


Please help in fixing this issue.


470.425710] ------------[ cut here ]------------
[ 470.425728] WARNING: CPU: 5 PID: 226 at drivers/scsi/sg.c:2236 sg_remove_sfp_usercontext+0x270/0x280 [sg]
[ 470.425739] Modules linked in: nvram nft_compat nf_tables libcrc32c nfnetlink rpadlpar_io rpaphp xsk_diag bonding tls rfkill binfmt_misc vmx_crypto pseries_rng dax_pmem drm drm_panel_orientation_quirks ext4 mbcache jbd2 dm_service_time sd_mod t10_pi crc64_rocksoft_generic crc64_rocksoft crc64 sg nd_pmem nd_btt ibmvfc papr_scm ibmvnic scsi_transport_fc ibmveth libnvdimm dm_multipath dm_mirror dm_region_hash dm_log dm_mod fuse
[ 470.425778] CPU: 5 PID: 226 Comm: kworker/5:1 Kdump: loaded Not tainted 6.9.0-rc1-next-20240328-auto #1
[ 470.425784] Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_016) hv:phyp pSeries
[ 470.425788] Workqueue: events sg_remove_sfp_usercontext [sg]
[ 470.425794] NIP: c008000004904110 LR: c008000004903ffc CTR: c0000000005391a0
[ 470.425799] REGS: c000000092297ae0 TRAP: 0700 Not tainted (6.9.0-rc1-next-20240328-auto)
[ 470.425803] MSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 44000204 XER: 00000001
[ 470.425814] CFAR: c00800000490400c IRQMASK: 0
[ 470.425814] GPR00: c008000004903ffc c000000092297d80 c008000004928900 c000000090581298
[ 470.425814] GPR04: 00000000c0000000 0000000000001281 c0000000056e0000 0000000000001280
[ 470.425814] GPR08: 000000135acf0000 0000000000000002 0000000000000000 c008000004908bc0
[ 470.425814] GPR12: c0000000005391a0 c0000013ffff9300 c0000000001a2b5c c0000000995efac0
[ 470.425814] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 470.425814] GPR20: c00000135cfb3b00 c0000000056fc030 c0000000056fc000 c0000000b15d3000
[ 470.425814] GPR24: 0000000000000000 c000000090581200 c0000000044e6c05 c0000000056fd330
[ 470.425814] GPR28: c00000135cfb3b00 c0000000056fc080 c0000000056fd328 c000000002fdee44
[ 470.425858] NIP [c008000004904110] sg_remove_sfp_usercontext+0x270/0x280 [sg]
[ 470.425864] LR [c008000004903ffc] sg_remove_sfp_usercontext+0x15c/0x280 [sg]
[ 470.425870] Call Trace:
[ 470.425872] [c000000092297d80] [c008000004903ffc] sg_remove_sfp_usercontext+0x15c/0x280 [sg] (unreliable)
[ 470.425879] [c000000092297e40] [c00000000019332c] process_one_work+0x20c/0x4f4
[ 470.425887] [c000000092297ef0] [c0000000001942ac] worker_thread+0x378/0x544
[ 470.425892] [c000000092297f90] [c0000000001a2c8c] kthread+0x138/0x140
[ 470.425898] [c000000092297fe0] [c00000000000df98] start_kernel_thread+0x14/0x18
[ 470.425903] Code: e8c98310 3d220000 e8698010 480044bd e8410018 7ec3b378 48004ac9 e8410018 38790098 81390098 2c090001 4182ff04 <0fe00000> 4bfffefc 000247e0 00000000
[ 470.425917] ---[ end trace 0000000000000000 ]---

Regards,
Venkat.