Re: [PATCH] bdi: Fix another oops in wb_workfn()

2018-05-26 Thread Tetsuo Handa
Tejun Heo wrote: > On Sun, May 27, 2018 at 11:21:25AM +0900, Tetsuo Handa wrote: > > syzbot is still hitting NULL pointer dereference at wb_workfn() [1]. > > This might be because we overlooked that delayed_work_timer_fn() does not > > check WB_registered before calling __queue_work() while

Re: [PATCH] bdi: Fix another oops in wb_workfn()

2018-05-26 Thread Tejun Heo
On Sun, May 27, 2018 at 11:21:25AM +0900, Tetsuo Handa wrote: > From 8a8222698163d1fe180258566e9a3ff43f54fcd9 Mon Sep 17 00:00:00 2001 > From: Tetsuo Handa > Date: Sun, 27 May 2018 11:08:20 +0900 > Subject: [PATCH] bdi: Fix another oops in wb_workfn() > >

[PATCH] bdi: Fix another oops in wb_workfn()

2018-05-26 Thread Tetsuo Handa
>From 8a8222698163d1fe180258566e9a3ff43f54fcd9 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Sun, 27 May 2018 11:08:20 +0900 Subject: [PATCH] bdi: Fix another oops in wb_workfn() syzbot is still hitting NULL pointer dereference at wb_workfn() [1]. This

Re: general protection fault in wb_workfn (2)

2018-05-26 Thread Tetsuo Handa
Forwarding http://lkml.kernel.org/r/201805251915.fgh64517.hvfjoolffmq...@i-love.sakura.ne.jp . Jan Kara wrote: > > void delayed_work_timer_fn(struct timer_list *t) > > { > > struct delayed_work *dwork = from_timer(dwork, t, timer); > > > > /* should have been called from irqsafe timer

Re: [PATCH 13/14] nvme: use the changed namespaces list log to clear ns data changed AENs

2018-05-26 Thread Christoph Hellwig
On Sat, May 26, 2018 at 12:05:02PM +, Popuri, Sriram wrote: > Reading the spec it looks like ns log is alternate approach: > > "Namespace Attribute Changed: The Identify Namespace data structure for one > or more namespaces, as well as the Namespace List returned when the Identify > command

RE: [PATCH 13/14] nvme: use the changed namespaces list log to clear ns data changed AENs

2018-05-26 Thread Popuri, Sriram
Reading the spec it looks like ns log is alternate approach: "Namespace Attribute Changed: The Identify Namespace data structure for one or more namespaces, as well as the Namespace List returned when the Identify command is issued with the CNS field set to 02h, have changed. Host software may

[PATCH 08/14] nvmet: implement the changed namespaces log

2018-05-26 Thread Christoph Hellwig
Just keep a per-controller buffer of changed namespaces and copy it out in the get log page implementation. Signed-off-by: Christoph Hellwig --- drivers/nvme/target/admin-cmd.c | 23 + drivers/nvme/target/core.c | 44 ++---

[PATCH 13/14] nvme: use the changed namespaces list log to clear ns data changed AENs

2018-05-26 Thread Christoph Hellwig
Per section 5.2 we need to issue the corresponding log page to clear an AEN, so for a namespace data changed AEN we need to read the changed namespace list log. And once we read that log anyway we might as well use it to optimize the rescan. Signed-off-by: Christoph Hellwig ---

[PATCH 14/14] nvme: limit warnings from nvme_identify_ns

2018-05-26 Thread Christoph Hellwig
When rescanning namespaces after an AEN we will issue Identify Namespace comands to namespaces that have gone away, so don't warn for this specific case. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH 07/14] nvmet: split log page implementation

2018-05-26 Thread Christoph Hellwig
Remove the common code to allocate a buffer and copy it into the SGL. Instead the two no-op implementations just zero the SGL directly, and the smart log allocates a buffer on its own. This prepares for the more elaborate ANA log page. Signed-off-by: Christoph Hellwig ---

[PATCH 12/14] nvme: mark nvme_queue_scan static

2018-05-26 Thread Christoph Hellwig
And move it toward the top of the file to avoid a forward declaration. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/core.c | 19 +-- drivers/nvme/host/nvme.h | 1 - 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/nvme/host/core.c

[PATCH 11/14] nvme: submit AEN event configuration on startup

2018-05-26 Thread Christoph Hellwig
From: Hannes Reinecke We should register for AEN events; some law-abiding targets might not be sending us AENs otherwise. Signed-off-by: Hannes Reinecke [hch: slight cleanups] Signed-off-by: Christoph Hellwig --- drivers/nvme/host/core.c | 17

[PATCH 09/14] nvmet: Add AEN configuration support

2018-05-26 Thread Christoph Hellwig
From: Hannes Reinecke AEN configuration via the 'Get Features' and 'Set Features' admin command is mandatory, so we should be implemeting handling for it. Signed-off-by: Hannes Reinecke [hch: use WRITE_ONCE, check for invalid values] Signed-off-by: Christoph

[PATCH 04/14] nvme.h: add the changed namespace list log

2018-05-26 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/linux/nvme.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/nvme.h b/include/linux/nvme.h index c37103a4ad38..7ce0f3cf4409 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@ -751,6 +751,7 @@ enum {

[PATCH 03/14] nvme.h: untangle AEN notice definitions

2018-05-26 Thread Christoph Hellwig
Stop including the event type in the definitions for the notice type. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/core.c | 30 ++ include/linux/nvme.h | 8 ++-- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git

nvme/nvmet AEN and log page fixups

2018-05-26 Thread Christoph Hellwig
Hi all, this series started as prep work for ANA, but has grown a lot. The idea is to make the AEN handling in the target closer to what the standard says, and implement the changed namespaces list log page, which is required to clear the namespace attribute notice event. One the host side this

[PATCH 06/14] nvmet: add a new nvmet_zero_sgl helper

2018-05-26 Thread Christoph Hellwig
Zeroes the SGL in the payload. Signed-off-by: Christoph Hellwig --- drivers/nvme/target/core.c | 7 +++ drivers/nvme/target/nvmet.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index 800aaf96ddcd..55c4bc693aa2

[PATCH 01/14] block: unexport check_disk_size_change

2018-05-26 Thread Christoph Hellwig
Only used in block_dev.c and the partitions code, and it should remain that way.. Signed-off-by: Christoph Hellwig --- fs/block_dev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 7ec920e27065..771ddfa29dc9 100644 --- a/fs/block_dev.c +++

[PATCH 05/14] nvme.h: add AER configuration symbols

2018-05-26 Thread Christoph Hellwig
From: Hannes Reinecke Signed-off-by: Hannes Reinecke [hch: split from a larger patch] Signed-off-by: Christoph Hellwig --- include/linux/nvme.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/nvme.h b/include/linux/nvme.h index

[PATCH 02/14] block: don't print a message when the device went away

2018-05-26 Thread Christoph Hellwig
The information about a size change in this case just creates confusion. Signed-off-by: Christoph Hellwig --- block/partition-generic.c | 4 ++-- fs/block_dev.c| 14 +- include/linux/fs.h| 2 +- 3 files changed, 12 insertions(+), 8 deletions(-)