From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752880AbdBPBmG (ORCPT ); Wed, 15 Feb 2017 20:42:06 -0500 Received: from mail-vk0-f67.google.com ([209.85.213.67]:35033 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751583AbdBPBmE (ORCPT ); Wed, 15 Feb 2017 20:42:04 -0500 MIME-Version: 1.0 In-Reply-To: References: From: Hangbin Liu Date: Thu, 16 Feb 2017 09:42:02 +0800 Message-ID: Subject: Re: [PATCH 3.2 086/126] igmp: do not remove igmp souce list info when set link down To: Ben Hutchings Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, akpm@linux-foundation.org, "David S. Miller" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-02-16 6:41 GMT+08:00 Ben Hutchings : > 3.2.85-rc1 review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Hangbin Liu > > commit 24803f38a5c0b6c57ed800b47e695f9ce474bc3a upstream. > > In commit 24cf3af3fed5 ("igmp: call ip_mc_clear_src..."), we forgot to remove > igmpv3_clear_delrec() in ip_mc_down(), which also called ip_mc_clear_src(). > This make us clear all IGMPv3 source filter info after NETDEV_DOWN. > Move igmpv3_clear_delrec() to ip_mc_destroy_dev() and then no need > ip_mc_clear_src() in ip_mc_destroy_dev(). > > On the other hand, we should restore back instead of free all source filter > info in igmpv3_del_delrec(). Or we will not able to restore IGMPv3 source > filter info after NETDEV_UP and NETDEV_POST_TYPE_CHANGE. > > Fixes: 24cf3af3fed5 ("igmp: call ip_mc_clear_src() only when ...") > Signed-off-by: Hangbin Liu > Signed-off-by: David S. Miller > [bwh: Backported to 3.2: > - Use IGMP_Unsolicited_Report_Count instead of sysctl_igmp_qrv > - Adjust context] > Signed-off-by: Ben Hutchings Hi Ben, There is a bug fix for this patch, please consider drop this patch or include the fix. commit 9c8bb163ae784be4f79ae504e78c862806087c54 Author: Hangbin Liu Date: Wed Feb 8 21:16:45 2017 +0800 igmp, mld: Fix memory leak in igmpv3/mld_del_delrec() In function igmpv3/mld_add_delrec() we allocate pmc and put it in idev->mc_tomb, so we should free it when we don't need it in del_delrec(). But I removed kfree(pmc) incorrectly in latest two patches. Now fix it. Fixes: 24803f38a5c0 ("igmp: do not remove igmp souce list info when ...") Fixes: 1666d49e1d41 ("mld: do not remove mld souce list info when ...") Reported-by: Daniel Borkmann Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller Thanks Hangbin