From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Christoph Hellwig <hch@infradead.org>, ally heev <allyheev@gmail.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: fix uninitialized pointers with free attr
Date: Wed, 19 Nov 2025 07:43:02 -0500 [thread overview]
Message-ID: <d2e1fc3c20f8301e0a841bee6143be5ddd4d0ef2.camel@HansenPartnership.com> (raw)
In-Reply-To: <aR2AWjHTtCszByqX@infradead.org>
On Wed, 2025-11-19 at 00:31 -0800, Christoph Hellwig wrote:
> On Wed, Nov 19, 2025 at 12:26:56PM +0530, ally heev wrote:
> > As per the ongoing discussion
> > https://lore.kernel.org/lkml/58fd478f408a34b578ee8d949c5c4b4da4d4f41d.camel@HansenPartnership.com/
> > , I believe there are no changes required here
>
> What about just dropping that __free thing that just make the code
> harder to read and more buggy?
It does? The original patch was this:
https://lore.kernel.org/linux-scsi/20240222214508.1630719-9-bvanassche@acm.org/
It's part of the series adding Advice Hints, so we can't just revert it
because the sense buffer would be too small. Using __free to replace a
stack allocation looks like a nice use of the cleanup primitives: I
think if we removed the __free and added a kfree before each of the six
returns that would make the code more prone to bugs on its next update.
Regards,
James
next prev parent reply other threads:[~2025-11-19 12:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 14:14 [PATCH] scsi: fix uninitialized pointers with free attr Ally Heev
2025-11-05 14:21 ` James Bottomley
2025-11-05 14:46 ` Dan Carpenter
2025-11-05 15:32 ` James Bottomley
2025-11-06 14:46 ` Dan Carpenter
2025-11-06 16:06 ` James Bottomley
2025-11-18 6:17 ` Dan Carpenter
2025-11-18 13:21 ` James Bottomley
2025-11-18 14:22 ` Dan Carpenter
2025-11-19 6:56 ` ally heev
2025-11-19 8:31 ` Christoph Hellwig
2025-11-19 12:43 ` James Bottomley [this message]
2025-11-20 4:15 ` 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=d2e1fc3c20f8301e0a841bee6143be5ddd4d0ef2.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=allyheev@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox