From: Kevin Wolf <kwolf@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH] block/iscsi: Document why we use raw malloc()
Date: Fri, 18 Aug 2023 17:56:48 +0200 [thread overview]
Message-ID: <ZN+UwJ3/D5vKfxEe@redhat.com> (raw)
In-Reply-To: <CAFEAcA-0prmwQ+En=oZnR=AH_v9DBUU=C7qjK+z436WDygBnhA@mail.gmail.com>
Am 27.07.2023 um 17:15 hat Peter Maydell geschrieben:
> On Thu, 27 Jul 2023 at 16:07, Peter Maydell <peter.maydell@linaro.org> wrote:
> >
> > In block/iscsi.c we use a raw malloc() call, which is unusual
> > given the project standard is to use the glib memory allocation
> > functions. Document why we do so, to avoid it being converted
> > to g_malloc() by mistake.
> >
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> > There aren't many uses of raw malloc() in the codebase
> > other than third-party library sourcecode. Mostly we have
> > a comment noting when we're doing it deliberately.
Thanks, applied to the block branch.
> The other option here would be to use scsi_create_task(),
> if we're OK with requiring libiscsi 1.13 or better (that's
> 9 years old at this point, so should be OK...)
I wouldn't mind either way, but since this patch exists and the other
doesn't, I'm applying this one for now.
Kevin
next prev parent reply other threads:[~2023-08-18 15:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 15:07 [PATCH] block/iscsi: Document why we use raw malloc() Peter Maydell
2023-07-27 15:15 ` Peter Maydell
2023-08-18 15:56 ` Kevin Wolf [this message]
2023-08-18 16:00 ` Peter Maydell
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=ZN+UwJ3/D5vKfxEe@redhat.com \
--to=kwolf@redhat.com \
--cc=hreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.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;
as well as URLs for NNTP newsgroup(s).