Re: [PATCH] net: ip, diag -- Add diag interface for raw sockets

2016-09-10 Thread Cyrill Gorcunov
On Sat, Sep 10, 2016 at 10:31:35AM -0600, David Ahern wrote: > On 9/9/16 12:26 PM, Cyrill Gorcunov wrote: > > In criu we are actively using diag interface to collect sockets > > present in the system when dumping applications. And while for > > unix, tcp, udp[lite], packet, netlink it works as expe

Re: [PATCH] net: ip, diag -- Add diag interface for raw sockets

2016-09-10 Thread David Ahern
On 9/9/16 12:26 PM, Cyrill Gorcunov wrote: > In criu we are actively using diag interface to collect sockets > present in the system when dumping applications. And while for > unix, tcp, udp[lite], packet, netlink it works as expected, > the raw sockets do not have. Thus add it. > > CC: David S. M

Re: [PATCH] net: ip, diag -- Add diag interface for raw sockets

2016-09-09 Thread Cyrill Gorcunov
On Fri, Sep 09, 2016 at 12:55:13PM -0700, Eric Dumazet wrote: > > + > > + rep = nlmsg_new(sizeof(struct inet_diag_msg) + > > + sizeof(struct inet_diag_meminfo) + 64, > > + GFP_KERNEL); > > + if (!rep) > > There is a missing sock_put(sk) > > > + re

Re: [PATCH] net: ip, diag -- Add diag interface for raw sockets

2016-09-09 Thread Eric Dumazet
On Fri, 2016-09-09 at 21:26 +0300, Cyrill Gorcunov wrote: ... > +static int raw_diag_dump_one(struct sk_buff *in_skb, > + const struct nlmsghdr *nlh, > + const struct inet_diag_req_v2 *r) > +{ > + struct raw_hashinfo *hashinfo = raw_get_hashin