All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-kernel@vger.kernel.org, darrick.wong@oracle.com,
	axboe@kernel.dk, tytso@mit.edu, jack@suse.cz, hch@infradead.org
Subject: Re: [PATCH 1/5] bh: Prevent panic on invalid BHs
Date: Thu, 06 Apr 2017 19:01:11 +0300	[thread overview]
Message-ID: <8760ihjzjs.fsf@dmlp.sw.ru> (raw)
In-Reply-To: <20170406154236.GA16767@infradead.org>

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.

  reply	other threads:[~2017-04-06 16:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 12:02 [PATCH 0/5] falloc on blockdevice: what possibly can go whong? Dmitry Monakhov
2017-04-06 12:02 ` [PATCH 1/5] bh: Prevent panic on invalid BHs Dmitry Monakhov
2017-04-06 15:42   ` Christoph Hellwig
2017-04-06 16:01     ` Dmitry Monakhov [this message]
2017-04-06 12:02 ` [PATCH 2/5] block: protect bdevname from null pointer bdev Dmitry Monakhov
2017-04-06 12:02 ` [PATCH 3/5] bio: Protect submit_bio from bdevless bio-s Dmitry Monakhov
2017-04-06 12:02 ` [PATCH 4/5] jbd2: use stable bdev pointer Dmitry Monakhov
2017-04-06 12:02 ` [PATCH 5/5] block: truncate page cache only when necessary on fallocate Dmitry Monakhov
2017-04-06 15:43   ` Christoph Hellwig
2017-04-06 15:51     ` Dmitry Monakhov

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=8760ihjzjs.fsf@dmlp.sw.ru \
    --to=dmonakhov@openvz.org \
    --cc=axboe@kernel.dk \
    --cc=darrick.wong@oracle.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.