From: Hongling Zeng <zhongling0719@126.com>
To: Hongling Zeng <zenghongling@kylinos.cn>,
Kai.Makisara@kolumbus.fi, James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com, djeffery@redhat.com,
jmeneghi@redhat.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: st: Fix lock leak in st_ioctl()
Date: Wed, 03 Jun 2026 15:16:20 +0800 [thread overview]
Message-ID: <6A1FD4C4.1080801@126.com> (raw)
In-Reply-To: <20260603071119.149362-1-zenghongling@kylinos.cn>
I sincerely apologize - I sent the wrong patch in my previous email.
Please disregard my previous patch submission.
在 2026年06月03日 15:11, Hongling Zeng 写道:
> The default case in the switch statement returns directly from
> st_common_ioctl() without releasing &STp->lock, causing a lock
> imbalance. Fix by jumping to the out label to properly release
> the lock.
>
> Fixes: b37d70c0df85 ("scsi: st: Separate st-unique ioctl handling from SCSI common ioctl handling")
> Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
> ---
> drivers/scsi/st.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
> index f1c3c4946637..3b08992e1b10 100644
> --- a/drivers/scsi/st.c
> +++ b/drivers/scsi/st.c
> @@ -3628,7 +3628,8 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
> case MTIOCTOP:
> break;
> default:
> - return st_common_ioctl(STp, STm, file, cmd_in, arg);
> + retval = st_common_ioctl(STp, STm, file, cmd_in, arg);
> + goto out;
> }
>
> cmd_type = _IOC_TYPE(cmd_in);
next prev parent reply other threads:[~2026-06-03 7:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 7:11 [PATCH] scsi: st: Fix lock leak in st_ioctl() Hongling Zeng
2026-06-03 7:16 ` Hongling Zeng [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-05-20 7:40 Hongling Zeng
2026-05-20 7:52 ` Hongling Zeng
2026-05-20 16:25 ` Bart Van Assche
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=6A1FD4C4.1080801@126.com \
--to=zhongling0719@126.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=Kai.Makisara@kolumbus.fi \
--cc=djeffery@redhat.com \
--cc=jmeneghi@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=zenghongling@kylinos.cn \
/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.