Re: [PATCH net 04/10] net/smc: protect smc ib device initialization

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

 



From: Karsten Graul <kgraul@xxxxxxxxxxxxx>
Date: Thu, 16 Jul 2020 17:37:40 +0200

> Fix that by protecting the critical code using a mutex.
 ...
> @@ -52,6 +52,7 @@ struct smc_ib_device {				/* ib-device infos for smc */
>  	DECLARE_BITMAP(ports_going_away, SMC_MAX_PORTS);
>  	atomic_t		lnk_cnt;	/* number of links on ibdev */
>  	wait_queue_head_t	lnks_deleted;	/* wait 4 removal of all links*/
> +	struct mutex		mutex;		/* protects smc ib device */
>  };

So which is it?  Does the mutex protect the entire contents of the
smc ib device struct, as stated in the comment?  Or does it only
synchronize object creation?

One of them is obviously wrong, so please correct that.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux