Re: [PATCH] nbd: call genl_unregister_family() first in nbd_cleanup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 05, 2021 at 10:19:46AM +0800, Hou Tao wrote:
> Else there may be race between module removal and handling of
> netlink command and will lead to oops as shown below:

Grammar suggestion:

Otherwise, there is a race between module removal and the handling of
a netlink command, which can lead to the oops shown below:

> 
> Signed-off-by: Hou Tao <houtao1@xxxxxxxxxx>
> ---
>  drivers/block/nbd.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
> index 9a7c9a425ab0..0993d108d868 100644
> --- a/drivers/block/nbd.c
> +++ b/drivers/block/nbd.c
> @@ -2492,6 +2492,12 @@ static void __exit nbd_cleanup(void)
>  	struct nbd_device *nbd;
>  	LIST_HEAD(del_list);
>  
> +	/*
> +	 * Unregister netlink interface first to waiting
> +	 * for the completion of netlink commands.

Grammar suggestion: s/first/prior/

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux