lkml.org 
[lkml]   [2016]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] fs/block_dev: fix potential NULL ptr deref in freeze_bdev()
From
Date
On 08/23/2016 09:55 AM, Andrey Ryabinin wrote:
> Calling freeze_bdev() twice on the same block device without mounted
> filesystem get_super() will return NULL, which will lead to NULL-ptr
> dereference later in drop_super().
>
> Check get_super() result to fix that.
>
> Note, that this is a purely theoretical issue. We have only 3
> freeze_bdev() callers. 2 of them are in filesystem code and used on a
> device with mounted fs. The third one in lock_fs() has protection in
> upper-layer code against freezing block device the second time without
> thawing it first.

Applied, thanks.

--
Jens Axboe

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.044 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site