linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] fix races between nbd setup and module removal
@ 2021-09-04 12:25 Hou Tao
  2021-09-04 12:25 ` [PATCH v2 1/3] nbd: use pr_err to output error message Hou Tao
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Hou Tao @ 2021-09-04 12:25 UTC (permalink / raw)
  To: Josef Bacik, Jens Axboe, linux-block; +Cc: nbd, hch, houtao1

Hi,

The patch series aims to fix the races between nbd setup and module
removal which may lead to oops. Patch #1 is just replacing
printk(KERN_ERR "nbd: ...") by pr_err("...") which makes it easier
to add error message in patch #3. Patch #2 serializes the concurrently
calling of nbd_genl_connect() and nbd_cleanup(), and patch #3 fixes race
between nbd_alloc_config() and nbd_cleanup().

Any comments are welcome.

Regards,
Tao

ChangeLog:
v2:
  * add a new patch "use pr_err to output error message"
  * add the missing error message in patch 3.

v1: https://www.spinics.net/lists/linux-block/msg72995.html

Hou Tao (3):
  nbd: use pr_err to output error message
  nbd: call genl_unregister_family() first in nbd_cleanup()
  nbd: fix race between nbd_alloc_config() and module removal

 drivers/block/nbd.c | 70 ++++++++++++++++++++++++++++-----------------
 1 file changed, 44 insertions(+), 26 deletions(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-09-14 11:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-04 12:25 [PATCH v2 0/3] fix races between nbd setup and module removal Hou Tao
2021-09-04 12:25 ` [PATCH v2 1/3] nbd: use pr_err to output error message Hou Tao
2021-09-06  9:27   ` Christoph Hellwig
2021-09-04 12:25 ` [PATCH v2 2/3] nbd: call genl_unregister_family() first in nbd_cleanup() Hou Tao
2021-09-06  9:27   ` Christoph Hellwig
2021-09-04 12:25 ` [PATCH v2 3/3] nbd: fix race between nbd_alloc_config() and module removal Hou Tao
2021-09-06  9:30   ` Christoph Hellwig
2021-09-06 10:08     ` Hou Tao
2021-09-06 10:25       ` Christoph Hellwig
2021-09-07  3:04         ` Hou Tao
2021-09-08 13:03           ` Hou Tao
2021-09-09  6:40           ` Christoph Hellwig
2021-09-13  4:32             ` Hou Tao
2021-09-13 15:25               ` Christoph Hellwig
2021-09-14 11:42               ` Wouter Verhelst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).