From: Jens Axboe <axboe@kernel.dk>
To: Douglas Gilbert <dgilbert@interlog.com>,
linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: martin.petersen@oracle.com, bvanassche@acm.org
Subject: Re: [RESEND PATCH] sgl_alloc_order: fix memory leak
Date: Fri, 16 Oct 2020 09:31:26 -0600 [thread overview]
Message-ID: <f1a4c312-2fbf-b149-bd43-7190af75ca24@kernel.dk> (raw)
In-Reply-To: <20201015185735.5480-1-dgilbert@interlog.com>
On 10/15/20 12:57 PM, Douglas Gilbert wrote:
> sgl_alloc_order() can fail when 'length' is large on a memory
> constrained system. When order > 0 it will potentially be
> making several multi-page allocations with the later ones more
> likely to fail than the earlier one. So it is important that
> sgl_alloc_order() frees up any pages it has obtained before
> returning NULL. In the case when order > 0 it calls the wrong
> free page function and leaks. In testing the leak was
> sufficient to bring down my 8 GiB laptop with OOM.
I've picked this one up, thanks.
--
Jens Axboe
prev parent reply other threads:[~2020-10-16 15:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 18:57 [RESEND PATCH] sgl_alloc_order: fix memory leak Douglas Gilbert
2020-10-16 15:31 ` Jens Axboe [this message]
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=f1a4c312-2fbf-b149-bd43-7190af75ca24@kernel.dk \
--to=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=dgilbert@interlog.com \
--cc=linux-block@vger.kernel.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