Re: [PATCH v3] scsi: sg: Avoid race in error handling & drop bogus warn

2024-04-04 Thread Alexander Wetzel
On 04.04.24 01:24, Bart Van Assche wrote: On 4/1/24 12:10 PM, Alexander Wetzel wrote: @@ -301,11 +302,12 @@ sg_open(struct inode *inode, struct file *filp)   /* This driver's module count bumped by fops_get in */   /* Prevent the device driver from vanishing while we sleep

Re: [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]

2024-04-02 Thread Alexander Wetzel
On 02.04.24 15:51, Venkat Rao Bagalkote wrote: Greetings!! Below warnings is observed with the commit 27f58c04a8f438078583041468ec60597841284d. Once reverting the above commit id, issue is resloved. Please help in fixing this issue. The fix for that is currently in review:

[PATCH v3] scsi: sg: Avoid race in error handling & drop bogus warn

2024-04-01 Thread Alexander Wetzel
nk: https://lore.kernel.org/all/5375b275-d137-4d5f-be25-6af8acae4...@linux.ibm.com Fixes: 27f58c04a8f4 ("scsi: sg: Avoid sg device teardown race") Cc: sta...@vger.kernel.org Signed-off-by: Alexander Wetzel --- Changes compared to V1: fixed commit message Changes compared to V2: Fix use-aft

Re: [PATCH v2] scsi: sg: Avoid race in error handling & drop bogus warn

2024-04-01 Thread Alexander Wetzel
On 01.04.24 19:09, Bart Van Assche wrote: On 4/1/24 03:03, Alexander Wetzel wrote: commit 27f58c04a8f4 ("scsi: sg: Avoid sg device teardown race") introduced an incorrect WARN_ON_ONCE() and missed a sequence where sg_device_destroy() was used after scsi_device_put(). Isn't that to

[PATCH v2] scsi: sg: Avoid race in error handling & drop bogus warn

2024-04-01 Thread Alexander Wetzel
nk: https://lore.kernel.org/all/5375b275-d137-4d5f-be25-6af8acae4...@linux.ibm.com Fixes: 27f58c04a8f4 ("scsi: sg: Avoid sg device teardown race") Cc: sta...@vger.kernel.org Signed-off-by: Alexander Wetzel --- Changes compared to V1: fixed commit message The WARN_ON_ONCE() was kind of stupi

[PATCH] scsi: sg: Avoid race in error handling & drop bogus warn

2024-04-01 Thread Alexander Wetzel
ing. Link: https://lore.kernel.org/all/5375b275-d137-4d5f-be25-6af8acae4...@linux.ibm.com Fixes: 27f58c04a8f4 ("scsi: sg: Avoid sg device teardown race") Cc: sta...@vger.kernel.org Signed-off-by: Alexander Wetzel --- The WARN_ON_ONCE() was kind of stupid to add: We get add reference fo

Re: [powerpc] WARN at drivers/scsi/sg.c:2236 (sg_remove_sfp_usercontext)

2024-03-29 Thread Alexander Wetzel
> Following WARN_ON_ONCE is triggered while running LTP tests > (specifically ioctl_sg01) on IBM Power booted with 6.9.0-rc1-next-20240328 > > [ 64.230233] [ cut here ] > [ 64.230269] WARNING: CPU: 10 PID: 452 at drivers/scsi/sg.c:2236 >