From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [net 1/1] tipc: fix memory leak of group member when peer node is lost Date: Tue, 26 Dec 2017 13:06:56 -0500 (EST) Message-ID: <20171226.130656.701776177319782594.davem@davemloft.net> References: <1513863394-11282-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, tipc-discussion@lists.sourceforge.net, hoang.h.le@dektech.com.au, mohan.krishna.ghanta.krishnamurthy@ericsson.com To: jon.maloy@ericsson.com Return-path: In-Reply-To: <1513863394-11282-1-git-send-email-jon.maloy@ericsson.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tipc-discussion-bounces@lists.sourceforge.net List-Id: netdev.vger.kernel.org From: Jon Maloy Date: Thu, 21 Dec 2017 14:36:34 +0100 > When a group member receives a member WITHDRAW event, this might have > two reasons: either the peer member is leaving the group, or the link > to the member's node has been lost. > > In the latter case we need to issue a DOWN event to the user right away, > and let function tipc_group_filter_msg() perform delete of the member > item. However, in this case we miss to change the state of the member > item to MBR_LEAVING, so the member item is not deleted, and we have a > memory leak. > > We now separate better between the four sub-cases of a WITHRAW event > and make sure that each case is handled correctly. > > Signed-off-by: Jon Maloy Applied. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot