All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Sachin Sant <sachinp@linux.ibm.com>
To: Alexander Wetzel <Alexander@wetzel-home.de>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Bart Van Assche <bvanassche@acm.org>,
	linux-scsi@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: Re: [powerpc] WARN at drivers/scsi/sg.c:2236 (sg_remove_sfp_usercontext)
Date: Fri, 29 Mar 2024 20:07:24 +0530	[thread overview]
Message-ID: <81266270-42F4-48F9-9139-8F0C3F0A6553@linux.ibm.com> (raw)
In-Reply-To: <20240329111025.9486-1-Alexander@wetzel-home.de>



> 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

  reply	other threads:[~2024-03-29 14:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29  9:08 [powerpc] WARN at drivers/scsi/sg.c:2236 (sg_remove_sfp_usercontext) Sachin Sant
2024-03-29  9:08 ` Sachin Sant
2024-03-29 11:10 ` Alexander Wetzel
2024-03-29 11:10   ` Alexander Wetzel
2024-03-29 14:37   ` Sachin Sant [this message]
2024-04-01  9:56     ` [PATCH] scsi: sg: Avoid race in error handling & drop bogus warn Alexander Wetzel
2024-04-01  9:56       ` Alexander Wetzel
2024-04-01 10:03     ` [PATCH v2] " Alexander Wetzel
2024-04-01 10:03       ` Alexander Wetzel
2024-04-01 17:09       ` Bart Van Assche
2024-04-01 17:09         ` Bart Van Assche
2024-04-01 19:01         ` Alexander Wetzel
2024-04-01 19:01           ` Alexander Wetzel
2024-04-01 19:10     ` [PATCH v3] " Alexander Wetzel
2024-04-01 19:10       ` Alexander Wetzel
2024-04-02  6:01       ` Sachin Sant
2024-04-02  6:01         ` Sachin Sant
2024-04-03 23:24       ` Bart Van Assche
2024-04-03 23:24         ` Bart Van Assche
2024-04-04  6:55         ` Alexander Wetzel
2024-04-04  6:55           ` Alexander Wetzel
2024-04-04 16:34       ` Bart Van Assche
2024-04-04 16:34         ` Bart Van Assche
2024-04-04 22:22       ` Martin K. Petersen
2024-04-04 22:22         ` Martin K. Petersen
2024-04-06  1:58       ` Martin K. Petersen
2024-04-06  1:58         ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81266270-42F4-48F9-9139-8F0C3F0A6553@linux.ibm.com \
    --to=sachinp@linux.ibm.com \
    --cc=Alexander@wetzel-home.de \
    --cc=bvanassche@acm.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.