Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1026894ybe; Wed, 4 Sep 2019 11:21:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPvqRgtoVKrElall8q/8IFayVaYFQjuOl/o9AsIE8aBuLz+6BAH9PldwiLk1Zu0aLR6jn4 X-Received: by 2002:a17:90a:2464:: with SMTP id h91mr6710089pje.9.1567621279756; Wed, 04 Sep 2019 11:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567621279; cv=none; d=google.com; s=arc-20160816; b=AxPEuET6IC7sQz7ErEqaxJlbnHgvlAhS4WvSvxfG5MFMTdMczefJWQf/+5rqFDAeM3 /y92O5Imf2wqeB6+lvKYo8aobaWzgEh4xEE76deXE72zrW4iHChIgmNkRnZWSCapByvB NbHF7ok1XSNRyUk8nSfeQ/RulHl8WntBTZMpWa5OoBQQPJVVuPXH68t8IlAplsFBrWAT pbmk0+I4tN70tYsGNMnfgVRySJklucDwXqDCdo34Sm/rE2dajZ5hozkbczPfpFaAUFT8 xfdKahftXx6HQr2G4GRAXvtBbv3RrVVh2ejC0UX1EkXm330aMmCUtcfOAZD4zXRlYT+6 4vmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JiRbTIC5hDRQ1BJMGgtiAIqxbLRxGLYOmCTeZKo1Hm8=; b=AFFS9Xuepn1YjM1vwjr/LLpG+9A0Nr91wMuRvBQaSj3VLadtvbi99Dw3u098GAu5ki WqkNkinCr31fWPmFs7OuNRUeOvqKesPGo9N1UYpvSLNpAiEo2dlQhPhVmsARrNJTqVNF nmKVcDNdR7PHD/HsC6qgRgLFLVJU03h+iWwd+W3xFNH7+SYoANbaqPZz9mNxh5aMQ3fK YF3ed4i0tHg4yex9wjjltXYdmlJ3sAVcYdg75Pk7Exz8Y1zhdwBEg9fTaJJLPFBuVmVj gPBRILaTp4N/lDjJl1r3OJo6wD7mIA57yulJ0y5ugA+ZlbMubw84PeKZelbDWWTRs2an 8QoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="kZ/PP0rK"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h125si21498755pfb.119.2019.09.04.11.21.04; Wed, 04 Sep 2019 11:21:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="kZ/PP0rK"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389886AbfIDSLW (ORCPT + 99 others); Wed, 4 Sep 2019 14:11:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:55296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390255AbfIDSLT (ORCPT ); Wed, 4 Sep 2019 14:11:19 -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 E364B208E4; Wed, 4 Sep 2019 18:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620678; bh=akaLcIMGPl7jRk2vLyKokSdiNDoH6/m1Fi2RRn2Oagk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kZ/PP0rKt5BaBLDAmv2BZtUBDllkYVnrMiPEYa+b+YL5yMZCCBKtdOrlrthts/RT7 XSVc2ILn0oLfSNXLVxCo/Ta7zKiBOfkGr5wKbKemdvaTsXUV3O+y3JwtBSlo7t/h36 rVv7JuaFrTo5uXXyEMrMmvFDZnYNQK/DThhVPFkk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Li RongQing , Florian Fainelli , Zhang Yu , "David S. Miller" Subject: [PATCH 5.2 052/143] net: fix __ip_mc_inc_group usage Date: Wed, 4 Sep 2019 19:53:15 +0200 Message-Id: <20190904175316.104436971@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175314.206239922@linuxfoundation.org> References: <20190904175314.206239922@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Li RongQing [ Upstream commit a1c4cd67840ef80f6ca5f73326fa9a6719303a95 ] in ip_mc_inc_group, memory allocation flag, not mcast mode, is expected by __ip_mc_inc_group similar issue in __ip_mc_join_group, both mcase mode and gfp_t are needed here, so use ____ip_mc_inc_group(...) Fixes: 9fb20801dab4 ("net: Fix ip_mc_{dec,inc}_group allocation context") Signed-off-by: Li RongQing Signed-off-by: Florian Fainelli Signed-off-by: Zhang Yu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/igmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -1474,7 +1474,7 @@ EXPORT_SYMBOL(__ip_mc_inc_group); void ip_mc_inc_group(struct in_device *in_dev, __be32 addr) { - __ip_mc_inc_group(in_dev, addr, MCAST_EXCLUDE); + __ip_mc_inc_group(in_dev, addr, GFP_KERNEL); } EXPORT_SYMBOL(ip_mc_inc_group); @@ -2196,7 +2196,7 @@ static int __ip_mc_join_group(struct soc iml->sflist = NULL; iml->sfmode = mode; rcu_assign_pointer(inet->mc_list, iml); - __ip_mc_inc_group(in_dev, addr, mode); + ____ip_mc_inc_group(in_dev, addr, mode, GFP_KERNEL); err = 0; done: return err;