Re: [PATCH 4.4 24/36] netlink: ensure to loop over all netns in genlmsg_multicast_allns()

From: Nicolas Dichtel
Date: Wed Mar 14 2018 - 13:06:42 EST


Le 13/03/2018 Ã 01:04, Ben Hutchings a ÃcritÂ:
> On Fri, 2018-03-09 at 16:18 -0800, Greg Kroah-Hartman wrote:
>> 4.4-stable review patch.ÂÂIf anyone has any objections, please let me know.
>>
>> ------------------
>>
>> From: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx>
>>
>>
>> [ Upstream commit cb9f7a9a5c96a773bbc9c70660dc600cfff82f82 ]
> [...]Â
>> - return nlmsg_multicast(prev->genl_sock, skb, portid, group, flags);
>> + err = nlmsg_multicast(prev->genl_sock, skb, portid, group, flags);
>> + if (!err)
>> + delivered = true;
>> + else if (err != -ESRCH)
>> + goto error;
>
> This call to nlmsg_multicast() consumes skb rather than a clone, so we
> must not free it again here.
Right, good catch.

I will send an update.

Regards,
Nicolas