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

From: Peter Zijlstra
Date: Wed May 20 2020 - 07:03:26 EST


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 ?