lkml.org 
[lkml]   [2018]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4.4 24/36] netlink: ensure to loop over all netns in genlmsg_multicast_allns()
From
Date
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@6wind.com>
>
>
> [ 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.

Ben.

> + return delivered ? 0 : -ESRCH;
>   error:
>   kfree_skb(skb);
>   return err;
>
>
>
--
Ben Hutchings
Software Developer, Codethink Ltd.

\
 
 \ /
  Last update: 2018-03-13 01:05    [W:0.184 / U:2.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site