Subject: Re: [PATCH net] netconsole: fix NULL pointer dereference

From: Nikolay Aleksandrov <[email-masked]>
Date: Thu, 24 Oct 2013 20:22:27 +0200

On 10/24/2013 07:56 PM, David Miller wrote:
> From: "David Laight" <[email-masked]>
> Date: Thu, 24 Oct 2013 11:39:02 +0100
> 
>>>> Taking the spinlock seems like the cleanest way to insure there's noone
>>>> running in parallel, but I'm open to suggestions as I'm not satisfied with
>>>> the looks of this. I'll prepare a net-next patchset for netconsole soon to
>>>> clean it up properly, all of these can be easily simplified.
>>>
>>> First when I've seen 'spin_lock(); a = 1; spin_unlock()' I've thought
>>> "WTF?", however indeed it will stop us racing with write_msg().
>>
>> Ditto - might be worth saying:
>>     /* Acquire lock to wait for any write_msg() to complete. */
> 
> Something this subtle definitely requires a comment.
> 
Okay, thank you all for the reviews. I will re-submit a v2 with
the comment edited.

Nik