Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1472086

Re: [PATCH] bdev: fix NULL pointer dereference in sync()/close() race

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] bdev: fix NULL pointer dereference in sync()/close() race
Date 2016-08-29 22:00 +0200
Message-ID <sbASR-37n-19@gated-at.bofh.it> (permalink)
References <saG4h-1xP-7@gated-at.bofh.it> <saHMK-2EO-25@gated-at.bofh.it> <saIfL-2OT-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On Sat, Aug 27, 2016 at 11:30:22AM +0200, Vegard Nossum wrote:
> > Don't know what's the right fix, but I posted a slightly different one
> > for the same crash some months ago:
> > https://patchwork.kernel.org/patch/8556941/
> > 
> 
> Ah, I'm sorry, I didn't see that.
> 
> Your patch is 100% identical to my first attempt at a fix and I can
> confirm that it also fixes the problem for me.
> 
> If people who are more savvy in block/fs code could ack the locking bits
> I think we should apply the patch ASAP because it's an easy local DOS if
> you have (open/read) access to any block device.

I think the right thing to do there is doing blkdev_get() /
blkdev_put() around func() invocation in iterate_bdevs() rather than
holding bd_mutex across the callback.  Can you please verify whether
that works?

Thanks.

-- 
tejun

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] bdev: fix NULL pointer dereference in sync()/close() race Vegard Nossum <vegard.nossum@oracle.com> - 2016-08-27 09:20 +0200
  Re: [PATCH] bdev: fix NULL pointer dereference in sync()/close() race Rabin Vincent <rabin@rab.in> - 2016-08-27 11:10 +0200
    Re: [PATCH] bdev: fix NULL pointer dereference in sync()/close() race Vegard Nossum <vegard.nossum@oracle.com> - 2016-08-27 11:40 +0200
      Re: [PATCH] bdev: fix NULL pointer dereference in sync()/close() race Tejun Heo <tj@kernel.org> - 2016-08-29 22:00 +0200
        Re: [PATCH] bdev: fix NULL pointer dereference in sync()/close() race Vegard Nossum <vegard.nossum@oracle.com> - 2016-08-29 23:00 +0200
          Re: [PATCH] bdev: fix NULL pointer dereference in sync()/close() race Tejun Heo <tj@kernel.org> - 2016-08-29 23:00 +0200
        Re: [PATCH] bdev: fix NULL pointer dereference in sync()/close() race Vegard Nossum <vegard.nossum@oracle.com> - 2016-08-29 23:40 +0200
          Re: [PATCH] bdev: fix NULL pointer dereference in sync()/close() race Tejun Heo <tj@kernel.org> - 2016-08-30 02:00 +0200

csiph-web