[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2200cf0b-d939-6166-402b-61c328f899cf@fb.com>
Date: Mon, 13 Mar 2017 08:54:19 -0600
From: Jens Axboe <axboe@...com>
To: Tahsin Erdogan <tahsin@...gle.com>, Tejun Heo <tj@...nel.org>,
"Alexander Viro" <viro@...iv.linux.org.uk>,
Jan Kara <jack@...e.cz>, John Sperbeck <jsperbeck@...gle.com>,
Peter Chang <dpf@...gle.com>
CC: <linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] writeback: fix memory leak in wb_queue_work()
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
Powered by blists - more mailing lists