From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [net 1/1] tipc: eliminate potential memory leak Date: Wed, 13 Dec 2017 13:45:12 -0500 (EST) Message-ID: <20171213.134512.2023826705476381469.davem@davemloft.net> References: <1513015915-22187-1-git-send-email-jon.maloy@ericsson.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, mohan.krishna.ghanta.krishnamurthy@ericsson.com, tung.q.nguyen@dektech.com.au, hoang.h.le@dektech.com.au, canh.d.luu@dektech.com.au, ying.xue@windriver.com, tipc-discussion@lists.sourceforge.net To: jon.maloy@ericsson.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:42530 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753130AbdLMSpO (ORCPT ); Wed, 13 Dec 2017 13:45:14 -0500 In-Reply-To: <1513015915-22187-1-git-send-email-jon.maloy@ericsson.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jon Maloy Date: Mon, 11 Dec 2017 19:11:55 +0100 > In the function tipc_sk_mcast_rcv() we call refcount_dec(&skb->users) > on received sk_buffers. Since the reference counter might hit zero at > this point, we have a potential memory leak. > > We fix this by replacing refcount_dec() with kfree_skb(). > > Signed-off-by: Jon Maloy Applied and queued up for -stable.