From: Mike Rapoport <rppt@kernel.org>
To: John Garry <john.g.garry@oracle.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Brian King <brking@us.ibm.com>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
Matthew Wilcox <willy@infradead.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [PATCH 2/4] scsi: proc: use kmalloc() in proc writers
Date: Wed, 1 Jul 2026 16:50:40 +0300 [thread overview]
Message-ID: <akUbMCOyt2NHNWCM@kernel.org> (raw)
In-Reply-To: <9d23ada8-8b43-4ab8-beeb-b51c99ea0eba@oracle.com>
On Wed, Jul 01, 2026 at 11:52:21AM +0100, John Garry wrote:
> On 30/06/2026 11:54, Mike Rapoport (Microsoft) wrote:
> > if (!buf || length>PAGE_SIZE)
> > return -EINVAL;
> > - if (!(buffer = (char *) __get_free_page(GFP_KERNEL)))
> > + if (!(buffer = kmalloc(PAGE_SIZE, GFP_KERNEL)))
> > return -ENOMEM;
>
> It would have been nice to use standard coding style checks for allocation
> failures, i.e.
>
> buffer = kmalloc(PAGE_SIZE, GFP_KERNEL);
> if (!buffer)
> return -ENOMEM;
Sure.
> > if (copy_from_user(buffer, buf
>
>
> Regardless of that:
>
> Reviewed-by: John Garry <john.g.garry@oracle.com>
Thanks!
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-07-01 13:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 10:54 [PATCH 0/4] scsi: replace __get_free_pages() with kmalloc() Mike Rapoport (Microsoft)
2026-06-30 10:54 ` [PATCH 1/4] scsi: target: file: use kmalloc() to allocate temporary protection buffer Mike Rapoport (Microsoft)
2026-07-01 6:58 ` Hannes Reinecke
2026-06-30 10:54 ` [PATCH 2/4] scsi: proc: use kmalloc() in proc writers Mike Rapoport (Microsoft)
2026-06-30 11:19 ` sashiko-bot
2026-07-01 6:58 ` Hannes Reinecke
2026-07-01 10:52 ` John Garry
2026-07-01 13:50 ` Mike Rapoport [this message]
2026-06-30 10:54 ` [PATCH 3/4] scsi: ipr: use kmalloc() to allocate IPR dump buffer memory Mike Rapoport (Microsoft)
2026-06-30 11:28 ` sashiko-bot
2026-07-01 7:03 ` Hannes Reinecke
2026-07-01 9:52 ` Mike Rapoport
2026-07-01 21:03 ` Brian King
2026-06-30 10:54 ` [PATCH 4/4] scsi: sym53c8xx_2: replace __get_free_pages() with kmalloc() Mike Rapoport (Microsoft)
2026-06-30 11:37 ` sashiko-bot
2026-07-01 7:04 ` Hannes Reinecke
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=akUbMCOyt2NHNWCM@kernel.org \
--to=rppt@kernel.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=brking@us.ibm.com \
--cc=john.g.garry@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=target-devel@vger.kernel.org \
--cc=willy@infradead.org \
/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