From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754674AbcIIURj (ORCPT ); Fri, 9 Sep 2016 16:17:39 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:35384 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752040AbcIIURg (ORCPT ); Fri, 9 Sep 2016 16:17:36 -0400 Date: Fri, 9 Sep 2016 23:17:31 +0300 From: Cyrill Gorcunov To: Eric Dumazet Cc: NETDEV , LKML , "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , Andrey Vagin , Stephen Hemminger Subject: Re: [PATCH] net: ip, diag -- Add diag interface for raw sockets Message-ID: <20160909201731.GD2366@uranus.lan> References: <20160909182636.GC2366@uranus.lan> <1473450913.18970.59.camel@edumazet-glaptop3.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1473450913.18970.59.camel@edumazet-glaptop3.roam.corp.google.com> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) > > > + return -ENOMEM; > > + > > + err = inet_sk_diag_fill(sk, NULL, rep, r, > > + sk_user_ns(NETLINK_CB(in_skb).sk), > > + NETLINK_CB(in_skb).portid, > > + nlh->nlmsg_seq, 0, nlh); > > sock_put(sk); Oh, missed. Thanks lot, Eric, will update!