syzbot is reporting circular locking dependency between bdev->bd_mutex and
lo->lo_ctl_mutex [1] which is caused by calling blkdev_reread_part() with
lock held. Don't hold loop_ctl_mutex while calling blkdev_reread_part().
Also, bring bdgrab() at loop_set_fd() to before loop_reread_partitions()
in
syzbot is reporting NULL pointer dereference [1] which is caused by
race condition between ioctl(loop_fd, LOOP_CLR_FD, 0) versus
ioctl(other_loop_fd, LOOP_SET_FD, loop_fd) due to traversing other
loop devices at loop_validate_file() without holding corresponding
lo->lo_ctl_mutex locks.
Since
syzbot is reporting NULL pointer dereference [1] which is caused by
race condition between ioctl(loop_fd, LOOP_CLR_FD, 0) versus
ioctl(other_loop_fd, LOOP_SET_FD, loop_fd) due to traversing other
loop devices at loop_validate_file() without holding corresponding
lo->lo_ctl_mutex locks.
Since
vfs_getattr() needs "struct path" rather than "struct file".
Let's use path_get()/path_put() rather than get_file()/fput().
Signed-off-by: Tetsuo Handa
---
drivers/block/loop.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/block/loop.c
Hi Bart
On 09/25/2018 10:20 AM, Bart Van Assche wrote:
> On 9/24/18 7:11 PM, jianchao.wang wrote:
>> Hi Keith
>>
>> On 09/25/2018 05:09 AM, Keith Busch wrote:
>>> - /* A deadlock might occur if a request is stuck requiring a
>>> - * timeout at the same time a queue freeze is waiting
>>> -
On 9/24/18 7:11 PM, jianchao.wang wrote:
Hi Keith
On 09/25/2018 05:09 AM, Keith Busch wrote:
- /* A deadlock might occur if a request is stuck requiring a
-* timeout at the same time a queue freeze is waiting
-* completion, since the timeout code would not be able to
-
Hi Keith
On 09/25/2018 05:09 AM, Keith Busch wrote:
> - /* A deadlock might occur if a request is stuck requiring a
> - * timeout at the same time a queue freeze is waiting
> - * completion, since the timeout code would not be able to
> - * acquire the queue reference here.
> -
On Mon, Sep 24, 2018 at 09:43:45AM +0200, Christoph Hellwig wrote:
> Hi Jens,
>
> this series moves various helpers related to merging based on physical
> addresses from the public headers into block/, cleans up the code a bit
> and removes not nessecary includes from the block headers.
>
>
A recent commit had tag iterator callbacks run under the rcu read
lock. Existing callbacks exist that do not satisy the rcu non-blocking
requirement.
The commit intended to prevent an iterator from accessing a queue that's
being modified. This patch fixes the original issue by taking a queue
On 2018/09/25 3:47, Jan Kara wrote:
>> +/*
>> + * unlock_loop - Unlock loop_mutex as needed.
>> + *
>> + * Explicitly call this function before calling fput() or
>> blkdev_reread_part()
>> + * in order to avoid circular lock dependency. After this function is
>> called,
>> + * current thread is
On Mon, 2018-09-24 at 11:01 -0700, Tejun Heo wrote:
> Hello, Bart.
>
> On Fri, Sep 21, 2018 at 01:31:19PM -0700, Bart Van Assche wrote:
> > +void percpu_ref_resurrect(struct percpu_ref *ref)
> > +{
> > + unsigned long __percpu *percpu_count;
> > unsigned long flags;
> >
> >
On Mon, Sep 24, 2018 at 12:51:07PM -0700, Bart Van Assche wrote:
> On Mon, 2018-09-24 at 13:13 -0600, Keith Busch wrote:
> > diff --git a/block/blk-mq.c b/block/blk-mq.c
> > index 85a1c1a59c72..28d128450621 100644
> > --- a/block/blk-mq.c
> > +++ b/block/blk-mq.c
> > @@ -848,22 +848,6 @@ static
On Mon, 2018-09-24 at 13:13 -0600, Keith Busch wrote:
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 85a1c1a59c72..28d128450621 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -848,22 +848,6 @@ static void blk_mq_timeout_work(struct work_struct *work)
> struct blk_mq_hw_ctx
On Mon, Sep 24, 2018 at 12:44:13PM -0600, Jens Axboe wrote:
> Hi,
>
> This commit introduced a rcu_read_lock() inside
> blk_mq_queue_tag_busy_iter() - this is problematic for the timout code,
> since we now end up holding the RCU read lock over the timeout code. As
> just one example, nvme ends
Hi,
This commit introduced a rcu_read_lock() inside
blk_mq_queue_tag_busy_iter() - this is problematic for the timout code,
since we now end up holding the RCU read lock over the timeout code. As
just one example, nvme ends up doing:
nvme_timeout()
nvme_dev_disable()
On 9/24/18 1:43 AM, Christoph Hellwig wrote:
> Hi Jens,
>
> this series moves various helpers related to merging based on physical
> addresses from the public headers into block/, cleans up the code a bit
> and removes not nessecary includes from the block headers.
>
> Change since V1:
> -
Hello, Bart.
On Fri, Sep 21, 2018 at 01:31:19PM -0700, Bart Van Assche wrote:
> +void percpu_ref_resurrect(struct percpu_ref *ref)
> +{
> + unsigned long __percpu *percpu_count;
> unsigned long flags;
>
> spin_lock_irqsave(_ref_switch_lock, flags);
>
> -
On Fri, Sep 21, 2018 at 08:27:17PM -0600, Jens Axboe wrote:
> On 9/21/18 5:44 PM, Omar Sandoval wrote:
> > From: Omar Sandoval
> >
> > Klaus Kusche reported that the I/O busy time in /proc/diskstats was not
> > updating properly on 4.18. This is because we started using ktime to
> > track
We only use it in biovec_phys_mergeable and a m68k paravirt driver,
so just opencode it there. Also remove the pointless unsigned long cast
for the offset in the opencoded instances.
Signed-off-by: Christoph Hellwig
Reviewed-by: Geert Uytterhoeven
---
arch/m68k/emu/nfblock.c | 2 +-
The actual recaculation of segments in __blk_recalc_rq_segments will
do this check, so there is no point in forcing it if we know it won't
succeed.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/block/bio.c b/block/bio.c
Turn the macro into an inline, move it to blk.h and simplify the
arch hooks a bit.
Also rename the function to biovec_phys_mergeable as there is no need
to shout.
Signed-off-by: Christoph Hellwig
---
arch/arm/include/asm/io.h | 5 ++---
arch/arm64/include/asm/io.h | 5 ++---
No need to pull in the BUG() defintion.
Signed-off-by: Christoph Hellwig
---
include/linux/bio.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/bio.h b/include/linux/bio.h
index b3d47862b1b4..f447b0ebb288 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -21,7
Now that we don't need an override for BIOVEC_PHYS_MERGEABLE there is
no need to drag this header in.
Signed-off-by: Christoph Hellwig
---
include/linux/bio.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 9ad4b0a487a4..b3d47862b1b4 100644
Keep it close to the actual users instead of exposing the function to all
drivers.
Signed-off-by: Christoph Hellwig
---
block/blk-merge.c | 65 +++
include/linux/blkdev.h | 69 --
2 files changed, 65 insertions(+),
No need to expose these helpers outside the block layer.
Signed-off-by: Christoph Hellwig
---
block/blk.h| 19 +++
include/linux/blkdev.h | 19 ---
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/block/blk.h b/block/blk.h
index
These two checks should always be performed together, so merge them into
a single helper.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 4 +---
block/blk-integrity.c | 12 ++--
block/blk-merge.c | 29 +
block/blk.h | 12
Signed-off-by: Christoph Hellwig
---
arch/arm/include/asm/io.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 2cfbc531f63b..6774553dc214 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -459,13 +459,6
No need to expose these to drivers.
Signed-off-by: Christoph Hellwig
---
block/blk.h| 35 +--
include/linux/blkdev.h | 31 ---
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/block/blk.h b/block/blk.h
index
Hi Jens,
this series moves various helpers related to merging based on physical
addresses from the public headers into block/, cleans up the code a bit
and removes not nessecary includes from the block headers.
Change since V1:
- dropped the Xen related changed which are moved into a new series
29 matches
Mail list logo