Replace the following two statements by the statement “goto put_nbd;”
nbd_put(nbd);
return 0;
Suggested-by: Markus Elfring
Signed-off-by: Sun Ke
---
drivers/block/nbd.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers
add put_nbd.
v2: Use jump target unlock.
Sun Ke (2):
nbd: Fix NULL pointer in flush_workqueue
nbd: share nbd_put and return by goto put_nbd
drivers/block/nbd.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
--
2.25.4
] __x64_sys_sendmsg+0x23/0x30
[ 656.390751] do_syscall_64+0x45/0x70
[ 656.391017] entry_SYSCALL_64_after_hwframe+0x44/0xa9
To fix it, just add if (nbd->recv_workq) to nbd_disconnect_and_put().
Signed-off-by: Sun Ke
---
v6: add if (nbd->recv_workq) to nbd_disconnect_and_put()
v5: add “Sugges
] __x64_sys_sendmsg+0x23/0x30
[ 656.390751] do_syscall_64+0x45/0x70
[ 656.391017] entry_SYSCALL_64_after_hwframe+0x44/0xa9
Fixes: e9e006f5fcf2 ("nbd: fix max number of supported devs")
Suggested-by: Markus Elfring
Signed-off-by: Sun Ke
---
v4: Share exception handling code for if branc
Replace the following two statements by the statement “goto put_nbd;”
nbd_put(nbd);
return 0;
Suggested-by: Markus Elfring
Signed-off-by: Sun Ke
---
drivers/block/nbd.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers
v5: Adjust the title and add “Suggested-by”.
v4: Share exception handling code for if branches and
move put_nbd adjustment to a separate patch.
v3: Do not use unlock and add put_nbd.
v2: Use jump target unlock.
Sun Ke (2):
nbd: Fix NULL pointer in flush_workqueue
nbd: share nbd_put
Replace the following two statements by the statement “goto put_nbd;”
nbd_put(nbd);
return 0;
Signed-off-by: Sun Ke
---
drivers/block/nbd.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 3c9b3bf3f4c2
] __x64_sys_sendmsg+0x23/0x30
[ 656.390751] do_syscall_64+0x45/0x70
[ 656.391017] entry_SYSCALL_64_after_hwframe+0x44/0xa9
Fixes: e9e006f5fcf2 ("nbd: fix max number of supported devs")
Signed-off-by: Sun Ke
---
v4: Share exception handling code for if branches
v3: Do not use unlock and a
v4: Share exception handling code for if branches and
move put_nbd adjustment to a separate patch.
v3: Do not use unlock and add put_nbd.
v2: Use jump target unlock.
Sun Ke (2):
nbd: Fix NULL pointer in flush_workqueue
nbd: share exception handling code by goto put_nbd
drivers
] __x64_sys_sendmsg+0x23/0x30
[ 656.390751] do_syscall_64+0x45/0x70
[ 656.391017] entry_SYSCALL_64_after_hwframe+0x44/0xa9
To fix it, just add a check for a non null task_recv in
nbd_genl_disconnect.
Fixes: e9e006f5fcf2 ("nbd: fix max number of supported devs")
Signed-off-by: Sun Ke
---
nbd_put(nbd);
return 0;
Sure, I will do it.
Regards,
Markus
Thanks,
Sun Ke
.
] __x64_sys_sendmsg+0x23/0x30
[ 656.390751] do_syscall_64+0x45/0x70
[ 656.391017] entry_SYSCALL_64_after_hwframe+0x44/0xa9
To fix it, just add a check for a non null task_recv in
nbd_genl_disconnect.
Fixes: e9e006f5fcf2 ("nbd: fix max number of supported devs")
Signed-off-by: Sun Ke
-
hi,Markus
在 2021/1/29 3:42, Markus Elfring 写道:
…
+++ b/drivers/block/nbd.c
@@ -2011,12 +2011,20 @@ static int nbd_genl_disconnect(struct sk_buff *skb,
struct genl_info *info)
index);
return -EINVAL;
}
+ mutex_lock(&nbd->config_lock);
] __x64_sys_sendmsg+0x23/0x30
[ 656.390751] do_syscall_64+0x45/0x70
[ 656.391017] entry_SYSCALL_64_after_hwframe+0x44/0xa9
To fix it, just add a check for a non null task_recv in
nbd_genl_disconnect.
Fixes: e9e006f5fcf2 ("nbd: fix max number of supported devs")
Signed-off-by: Sun Ke
--
在 2020/2/12 10:00, sunke (E) 写道:
在 2020/2/12 0:39, Mike Christie 写道:
On 02/10/2020 10:12 PM, sunke (E) wrote:
在 2020/2/11 1:05, Mike Christie 写道:
On 02/10/2020 01:32 AM, Sun Ke wrote:
Open /dev/nbdX first, the config_refs will be 1 and
the pointers in nbd_device are still null
ce being setup by another
task" in nbd_add_sock() and nbd device can not be reused.
Fixes: 8f3ea35929a0 ("nbd: handle unexpected replies better")
Signed-off-by: Sun Ke
---
drivers/block/nbd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/block/nbd.
16 matches
Mail list logo