Re: [PATCH 6/8] connector/cn_proc: Protect send_msg() with a local lock

Peter Zijlstra
2020-05-20T11:03:25Z

On Tue, May 19, 2020 at 10:19:10PM +0200, Sebastian Andrzej Siewior wrote:
> @@ -40,10 +41,11 @@ static struct cb_id cn_proc_event_id = { CN_IDX_PROC, CN_VAL_PROC };
>
> /* proc_event_counts is used as the sequence number of the netlink message */
> static DEFINE_PER_CPU(__u32, proc_event_counts) = { 0 };
> +static DEFINE_LOCAL_LOCK(send_msg_lock);

Put it in a struct ?