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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 2FA2DC433E3 for ; Thu, 14 May 2020 18:55:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0078F207F7 for ; Thu, 14 May 2020 18:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589482552; bh=1QWCUL5vRuxYNGFBT1+2kVaHfGuNLGgHpwwsbTNUwk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=PBIUy6WiaJxWDXkB+7nPT+JeXKFv3YUAW0f4fB+2K4QP1PYHUYH5uFXGSR2/uMrhU iFuXH1kVqx/N+Q+C59IhNYLKYBf4rus8YttroqEYqUJW7wvHmB1UYKWgm2q+9BC25I H4wohAb7EvUlnVk2GpP3/8x3ky0EnNYXnn+hm6aE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729510AbgENSzv (ORCPT ); Thu, 14 May 2020 14:55:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:56218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729430AbgENSzh (ORCPT ); Thu, 14 May 2020 14:55:37 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4CC6D207CD; Thu, 14 May 2020 18:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589482537; bh=1QWCUL5vRuxYNGFBT1+2kVaHfGuNLGgHpwwsbTNUwk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lglLnwJtOIPesePjWVQyj+FegKfhcasCQ8bOpZBQHYaE27kDI1T0H5193FsIbUZdG yh9fAp9k2eVs01qdcUArTNiAp6Rmf1pMzqCqDiN48xJLEstvtocnKur9vIADfpxcIt t+iYbQbD6Hy9EORMsKdlKjoouLU0EUVG+YG/nZKY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yoshiyuki Kurauchi , "David S . Miller" , Sasha Levin , osmocom-net-gprs@lists.osmocom.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 30/39] gtp: set NLM_F_MULTI flag in gtp_genl_dump_pdp() Date: Thu, 14 May 2020 14:54:47 -0400 Message-Id: <20200514185456.21060-30-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200514185456.21060-1-sashal@kernel.org> References: <20200514185456.21060-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yoshiyuki Kurauchi [ Upstream commit 846c68f7f1ac82c797a2f1db3344a2966c0fe2e1 ] In drivers/net/gtp.c, gtp_genl_dump_pdp() should set NLM_F_MULTI flag since it returns multipart message. This patch adds a new arg "flags" in gtp_genl_fill_info() so that flags can be set by the callers. Signed-off-by: Yoshiyuki Kurauchi Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/gtp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 92e4e5d53053f..090607e725a24 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -1177,11 +1177,11 @@ static int gtp_genl_del_pdp(struct sk_buff *skb, struct genl_info *info) static struct genl_family gtp_genl_family; static int gtp_genl_fill_info(struct sk_buff *skb, u32 snd_portid, u32 snd_seq, - u32 type, struct pdp_ctx *pctx) + int flags, u32 type, struct pdp_ctx *pctx) { void *genlh; - genlh = genlmsg_put(skb, snd_portid, snd_seq, >p_genl_family, 0, + genlh = genlmsg_put(skb, snd_portid, snd_seq, >p_genl_family, flags, type); if (genlh == NULL) goto nlmsg_failure; @@ -1235,8 +1235,8 @@ static int gtp_genl_get_pdp(struct sk_buff *skb, struct genl_info *info) goto err_unlock; } - err = gtp_genl_fill_info(skb2, NETLINK_CB(skb).portid, - info->snd_seq, info->nlhdr->nlmsg_type, pctx); + err = gtp_genl_fill_info(skb2, NETLINK_CB(skb).portid, info->snd_seq, + 0, info->nlhdr->nlmsg_type, pctx); if (err < 0) goto err_unlock_free; @@ -1279,6 +1279,7 @@ static int gtp_genl_dump_pdp(struct sk_buff *skb, gtp_genl_fill_info(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, + NLM_F_MULTI, cb->nlh->nlmsg_type, pctx)) { cb->args[0] = i; cb->args[1] = j; -- 2.20.1