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


Groups > linux.kernel > #1618142

Re: [PATCH 1/5] bh: Prevent panic on invalid BHs

From Dmitry Monakhov <dmonakhov@openvz.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/5] bh: Prevent panic on invalid BHs
Date 2017-04-06 18:10 +0200
Message-ID <tti8W-33D-21@gated-at.bofh.it> (permalink)
References <tteoF-8jD-7@gated-at.bofh.it> <tteoF-8jD-5@gated-at.bofh.it> <tthPA-2yp-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Christoph Hellwig <hch@infradead.org> writes:

> This look ok, but how did you manage to trigger this case? 

# testcases
# TEST1
# Via bug in fallocate
truncate -l 1G img
losetup  /dev/loop img
mkfs.ext4 -qF /dev/loop0
mkdir m
mount /dev/loop0 m
# command above truncate bdevs pagecache
xfs_io -c "falloc -k 0 32G" -d /dev/loop0
for ((i=0;i<100;i++));do
    xfs_io -c "pwrite 0 4k" -d m/test-$i;
done
sync



# TEST2: NBD close_sock -> kill_bdev
mkdir  -p a/mnt
cd a
truncate -s 1G img
mkfs.ext4 -qF img
qemu-nbd -c /dev/nbd0 img
mount /dev/nbd0 /mnt
cp -r /bin/ /mnt&
# Disconnect nbd while cp is active
qemu-nbd -d /dev/nbd0
sync

> I think
> we might have a deeper problem here.
Probably. It seems that !buffer_locked(bh) case should stay BUG_ON
because it is hard to make semi-correct decesion here.

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


Thread

[PATCH 1/5] bh: Prevent panic on invalid BHs Dmitry Monakhov <dmonakhov@openvz.org> - 2017-04-06 14:10 +0200
  Re: [PATCH 1/5] bh: Prevent panic on invalid BHs Christoph Hellwig <hch@infradead.org> - 2017-04-06 17:50 +0200
    Re: [PATCH 1/5] bh: Prevent panic on invalid BHs Dmitry Monakhov <dmonakhov@openvz.org> - 2017-04-06 18:10 +0200

csiph-web