From: Jens Axboe <axboe@fb.com>
To: Tahsin Erdogan <tahsin@google.com>, Tejun Heo <tj@kernel.org>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
Jan Kara <jack@suse.cz>, John Sperbeck <jsperbeck@google.com>,
Peter Chang <dpf@google.com>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] writeback: fix memory leak in wb_queue_work()
Date: Mon, 13 Mar 2017 08:54:19 -0600 [thread overview]
Message-ID: <2200cf0b-d939-6166-402b-61c328f899cf@fb.com> (raw)
In-Reply-To: <20170310200949.26359-1-tahsin@google.com>
On 03/10/2017 01:09 PM, Tahsin Erdogan wrote:
> When WB_registered flag is not set, wb_queue_work() skips queuing the
> work, but does not perform the necessary clean up. In particular, if
> work->auto_free is true, it should free the memory.
>
> The leak condition can be reprouced by following these steps:
>
> mount /dev/sdb /mnt/sdb
> /* In qemu console: device_del sdb */
> umount /dev/sdb
>
> Above will result in a wb_queue_work() call on an unregistered wb and
> thus leak memory.
Added for 4.11, thanks Tahsin.
--
Jens Axboe
prev parent reply other threads:[~2017-03-13 14:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 20:09 Tahsin Erdogan
2017-03-13 14:23 ` Jan Kara
2017-03-13 14:54 ` 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=2200cf0b-d939-6166-402b-61c328f899cf@fb.com \
--to=axboe@fb.com \
--cc=dpf@google.com \
--cc=jack@suse.cz \
--cc=jsperbeck@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tahsin@google.com \
--cc=tj@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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®