[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZW8ICbik45ODsRUW@nanopsycho>
Date: Tue, 5 Dec 2023 12:22:49 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Johannes Berg <johannes@...solutions.net>
Cc: netdev@...r.kernel.org, Johannes Berg <johannes.berg@...el.com>
Subject: Re: [RFC PATCH] net: rtnetlink: remove local list in
__linkwatch_run_queue()
Mon, Dec 04, 2023 at 09:19:53PM CET, johannes@...solutions.net wrote:
>From: Johannes Berg <johannes.berg@...el.com>
Why rfc?
>
>Due to linkwatch_forget_dev() (and perhaps others?) checking for
>list_empty(&dev->link_watch_list), we must have all manipulations
>of even the local on-stack list 'wrk' here under spinlock, since
>even that list can be reached otherwise via dev->link_watch_list.
>
>This is already the case, but makes this a bit counter-intuitive,
>often local lists are used to _not_ have to use locking for their
>local use.
>
>Remove the local list as it doesn't seem to serve any purpose.
>While at it, move a variable declaration into the loop using it.
>
>Signed-off-by: Johannes Berg <johannes.berg@...el.com>
Reviewed-by: Jiri Pirko <jiri@...dia.com>
Powered by blists - more mailing lists