Re: [net-next v5 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices
From: David Miller
Date: Wed Aug 26 2020 - 10:35:13 EST
From: Vadym Kochan <vadym.kochan@xxxxxxxxxxx>
Date: Wed, 26 Aug 2020 11:17:44 +0300
> Initially there was (in RFC patch set), not locking, but _rcu list API
> used, because the port list is modified only by 1 writer when creating
> the port or deleting it on switch uninit (the really theoretical case
> which might happen is that event might be received at that time which
> causes to loop over this list to find the port), as I understand
> correctly list_add_rcu is safe to use with no additional locking if there is 1
> writer and many readers ? So can I use back this approach ?
Are you really certain only one writer can exist at one time?