From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97408C28CC7 for ; Mon, 3 Jun 2019 09:15:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6642927F20 for ; Mon, 3 Jun 2019 09:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559553317; bh=EalTZgYLMxKMB+SmBCfQ3J+rYslJYpfRcOIGgXSOiW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=12pch8jQLfgUhPpvs8ADx1N40udyiFr64CZjc1WJnTmTj9H33NpnYm8mrvKUhBde5 cqixA5mQOXNIWuU/KZGa+snq0qLW/FprkUGGQLIbnyVflJQwaYWKxHg5Gxe/x+dW/H ILvim9Bh3cVNA2e/ciTBufJ9pB7UlEHSYyb1lwmU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728377AbfFCJOE (ORCPT ); Mon, 3 Jun 2019 05:14:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:34558 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728223AbfFCJOA (ORCPT ); Mon, 3 Jun 2019 05:14:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4DB6627EC8; Mon, 3 Jun 2019 09:13:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559553239; bh=EalTZgYLMxKMB+SmBCfQ3J+rYslJYpfRcOIGgXSOiW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oBqXxow+4luDbYK7wHZLLG4NX6tQuIMB2c1MIwKo1dkR+sPdRu/lyJ+CCUYenUPDa btEYg2znqYiw0vLPYnDAddtNB4zR3TziBXtX31Gd9jDLBylABiDHMgbuNKIIK89ryI gTyQs0wvWF+F8+8bDAzpu/207K2cyEqs96zoGOKE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , kbuild test robot , "David S. Miller" Subject: [PATCH 5.1 06/40] ipv4/igmp: fix build error if !CONFIG_IP_MULTICAST Date: Mon, 3 Jun 2019 11:08:59 +0200 Message-Id: <20190603090523.025416619@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190603090522.617635820@linuxfoundation.org> References: <20190603090522.617635820@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Eric Dumazet [ Upstream commit 903869bd10e6719b9df6718e785be7ec725df59f ] ip_sf_list_clear_all() needs to be defined even if !CONFIG_IP_MULTICAST Fixes: 3580d04aa674 ("ipv4/igmp: fix another memory leak in igmpv3_del_delrec()") Signed-off-by: Eric Dumazet Reported-by: kbuild test robot Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/igmp.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -188,6 +188,17 @@ static void ip_ma_put(struct ip_mc_list pmc != NULL; \ pmc = rtnl_dereference(pmc->next_rcu)) +static void ip_sf_list_clear_all(struct ip_sf_list *psf) +{ + struct ip_sf_list *next; + + while (psf) { + next = psf->sf_next; + kfree(psf); + psf = next; + } +} + #ifdef CONFIG_IP_MULTICAST /* @@ -633,17 +644,6 @@ static void igmpv3_clear_zeros(struct ip } } -static void ip_sf_list_clear_all(struct ip_sf_list *psf) -{ - struct ip_sf_list *next; - - while (psf) { - next = psf->sf_next; - kfree(psf); - psf = next; - } -} - static void kfree_pmc(struct ip_mc_list *pmc) { ip_sf_list_clear_all(pmc->sources);