Liping Zhang writes:
> 2016-09-28 11:08 GMT+08:00 Liping Zhang :
>> Hi Feng,
>>
>> 2016-09-28 9:23 GMT+08:00 Feng Gao :
>>> Hi Aaraon,
>>>
>>> On Tue, Sep 27, 2016 at 9:38 PM, Aaron Conole wrote:
It's possible for nf_hook_entry_head to return NULL if two
nf_unregister_net_hook calls ha
Hi Liping,
On Wed, Sep 28, 2016 at 11:13 AM, Liping Zhang wrote:
> 2016-09-28 11:08 GMT+08:00 Liping Zhang :
>> Hi Feng,
>>
>> 2016-09-28 9:23 GMT+08:00 Feng Gao :
>>> Hi Aaraon,
>>>
>>> On Tue, Sep 27, 2016 at 9:38 PM, Aaron Conole wrote:
It's possible for nf_hook_entry_head to return NULL
2016-09-28 11:08 GMT+08:00 Liping Zhang :
> Hi Feng,
>
> 2016-09-28 9:23 GMT+08:00 Feng Gao :
>> Hi Aaraon,
>>
>> On Tue, Sep 27, 2016 at 9:38 PM, Aaron Conole wrote:
>>> It's possible for nf_hook_entry_head to return NULL if two
>>> nf_unregister_net_hook calls happen simultaneously with a single
Hi Feng,
2016-09-28 9:23 GMT+08:00 Feng Gao :
> Hi Aaraon,
>
> On Tue, Sep 27, 2016 at 9:38 PM, Aaron Conole wrote:
>> It's possible for nf_hook_entry_head to return NULL if two
>> nf_unregister_net_hook calls happen simultaneously with a single hook
>
> The critical region of nf_unregister_net_h
Hi Aaraon,
On Tue, Sep 27, 2016 at 9:38 PM, Aaron Conole wrote:
> It's possible for nf_hook_entry_head to return NULL if two
> nf_unregister_net_hook calls happen simultaneously with a single hook
The critical region of nf_unregister_net_hook is protected by &nf_hook_mutex.
When it would be call
It's possible for nf_hook_entry_head to return NULL if two
nf_unregister_net_hook calls happen simultaneously with a single hook
entry in the list. This fix ensures that no null pointer dereference
could occur when such a race happens.
Signed-off-by: Aaron Conole
---
net/netfilter/core.c | 2 +-