From: Bart Van Assche <bvanassche@acm.org>
To: Yingjie Wang <x-professor@outlook.com>,
"Martin K. Petersen" <mkp@kernel.org>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Yang Xiuwei <yangxiuwei@kylinos.cn>,
James Houghton <jthoughton@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 2/4] scsi: core: release legacy ioctl request before user copyback
Date: Thu, 19 Nov 2026 13:37:25 -0800 [thread overview]
Message-ID: <b6d6087a-a89a-4d5e-80e2-6b7f07facbf5@acm.org> (raw)
In-Reply-To: <26e7d8d4f0648e572e6042c0ae14c1c36a83e850.1794990780.git.x-professor@outlook.com>
On 11/18/26 12:33 AM, Yingjie Wang wrote:
> } else {
> if (copy_to_user(sic->data, buffer, out_len))
> err = -EFAULT;
> }
> + goto error_free_buffer;
>
> error:
> blk_mq_free_request(rq);
A goto statement that only skips the label and the statement that
follows it makes this function harder to read. Has it been considered to
restructure this code such that this goto statement is not necessary,
e.g. by setting 'rq' to NULL after it has been freed and by changing
the code below the 'error' label into the following?
if (rq)
blk_mq_free_request(rq);
Thanks,
Bart.
next prev parent reply other threads:[~2026-11-19 21:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 8:33 [PATCH v4 0/4] scsi: release completed passthrough requests " Yingjie Wang
2026-11-18 8:33 ` [PATCH v4 1/4] scsi: core: release SG_IO request " Yingjie Wang
2026-11-19 21:36 ` Bart Van Assche
2026-11-18 8:33 ` [PATCH v4 2/4] scsi: core: release legacy ioctl " Yingjie Wang
2026-11-19 21:36 ` Bart Van Assche
2026-11-19 21:37 ` Bart Van Assche [this message]
2026-11-18 8:33 ` [PATCH v4 3/4] scsi: sr: release CDDA " Yingjie Wang
2026-11-18 8:33 ` [PATCH v4 4/4] scsi: bsg: release synchronous " Yingjie Wang
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=b6d6087a-a89a-4d5e-80e2-6b7f07facbf5@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=jthoughton@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=x-professor@outlook.com \
--cc=yangxiuwei@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®