Re: [powerpc] WARN at drivers/scsi/sg.c:2236 (sg_remove_sfp_usercontext)
From: Sachin Sant <hidden>
Date: 2024-03-29 14:37:55
Also in:
linux-scsi
Can you check the debug patch below and provide output? When I'm right the warning should be gone and you should just get the "Modification triggered" instead. When I'm wrong we should at least see, how many references d_ref has left.
With the debug patch applied, code says d_ref value is 2 # ./ioctl_sg01 tst_test.c:1741: TINFO: LTP version: 20210524-2511-g00b497c47 tst_test.c:1625: TINFO: Timeout per run is 1h 00m 30s ioctl_sg01.c:83: TINFO: Found SCSI device /dev/sg0 [ 36.016630] ------------[ cut here ]------------ [ 36.016674] WARNING: CPU: 19 PID: 460 at drivers/scsi/sg.c:2238 sg_remove_sfp_usercontext+0x270/0x298 [sg] [ 36.016707] Modules linked in: rpadlpar_io rpaphp xsk_diag nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 bonding tls rfkill ip_set nf_tables nfnetlink sunrpc binfmt_misc pseries_rng vmx_crypto xfs libcrc32c sd_mod sr_mod t10_pi crc64_rocksoft_generic cdrom crc64_rocksoft crc64 sg ibmvscsi scsi_transport_srp ibmveth fuse [ 36.016834] CPU: 19 PID: 460 Comm: kworker/19:1 Kdump: loaded Not tainted 6.9.0-rc1-next-20240328-dirty #3 [ 36.016849] Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_018) hv:phyp pSeries [ 36.016868] Workqueue: events sg_remove_sfp_usercontext [sg] [ 36.016889] NIP: c008000015cf4110 LR: c008000015cf4000 CTR: c0000000005393b0 [ 36.016903] REGS: c00000009414fae0 TRAP: 0700 Not tainted (6.9.0-rc1-next-20240328-dirty) [ 36.016921] MSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 44000448 XER: 00000000 [ 36.016962] CFAR: c008000015cf400c IRQMASK: 0 [ 36.016962] GPR00: c008000015cf4000 c00000009414fd80 c008000015d18900 0000000000000000 [ 36.016962] GPR04: 00000000c0000000 0000000000000023 c000000008dee000 0000000000000022 [ 36.016962] GPR08: 000000038a6d0000 0000000000000002 0000000000000000 c008000015cf8c10 [ 36.016962] GPR12: c0000000005393b0 c00000038ffe8b00 c0000000001a2bac c000000008e4e980 [ 36.016962] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 36.016962] GPR20: c00000038c993b00 c000000008dea030 c000000008dea000 c0000000a2712000 [ 36.016962] GPR24: 0000000000000000 c00000000c3bd380 c0000000045ab205 c000000008deb330 [ 36.016962] GPR28: c00000038c993b00 c000000008dea080 c000000008deb328 c00000000c3bd418 [ 36.017107] NIP [c008000015cf4110] sg_remove_sfp_usercontext+0x270/0x298 [sg] [ 36.017129] LR [c008000015cf4000] sg_remove_sfp_usercontext+0x160/0x298 [sg] [ 36.017144] Call Trace: [ 36.017148] [c00000009414fd80] [c008000015cf4000] sg_remove_sfp_usercontext+0x160/0x298 [sg] (unreliable) [ 36.017169] [c00000009414fe40] [c00000000019337c] process_one_work+0x20c/0x4f4 [ 36.017189] [c00000009414fef0] [c0000000001942fc] worker_thread+0x378/0x544 [ 36.017208] [c00000009414ff90] [c0000000001a2cdc] kthread+0x138/0x140 [ 36.017225] [c00000009414ffe0] [c00000000000df98] start_kernel_thread+0x14/0x18 [ 36.017241] Code: 3bf90098 e8c98310 3d220000 e8698010 48004509 e8410018 7ec3b378 48004b15 e8410018 81390098 2c090001 4182ff04 <0fe00000> 80990098 3d220000 78840020 [ 36.017289] ---[ end trace 0000000000000000 ]--- [ 36.017302] d_ref=2 ioctl_sg01.c:124: TPASS: Output buffer is empty, no data leaked [ 44.707319] d_ref=2 Summary: passed 1 failed 0 broken 0 skipped 0 warnings 0 — Sachin