Message ID | 20240102205959.794513-1-almasrymina@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-14820-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp4679763dyb; Tue, 2 Jan 2024 13:00:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFoTulYTbupD8PhxNOKsyltZB50/iUn6yVh41aaBxaFchFdNxqQcM959gcc265RTPc8xXYW X-Received: by 2002:a05:6830:a45:b0:6db:fdb3:e616 with SMTP id g5-20020a0568300a4500b006dbfdb3e616mr7947066otu.72.1704229246864; Tue, 02 Jan 2024 13:00:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704229246; cv=none; d=google.com; s=arc-20160816; b=KLOpOeveqT4VMQRQmQhk3FVCfBlPuVrmNOq4BJFCKvkTt0+U+0lUJLrz9QjyzGXyjD XaY8XrpAOVsRKZzVm5OrqiL0QJQbhC9kD7iumh6e8k5tedqGCVOmkp1AQjmpham48WrP tUFcKFN2/hFgvxfkWYfiuWvaGa2UuBdx03zJIpdPYPdUXvCVVMeIRAlDe1RlDdw5bdh2 B/zmZk6azGMUxSRuLGHMBoVPXwQX/SFm2tff+/vHwo6MPgRXttrbTso7aBO/dP1A1PQK gxHp0BGyFsbQcJCVIKgE034CR0JJ20+woZPLyc+bJ0kwl1UR/XXgmLSFsna+nz/x/V9W qkRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=Ec50JyuVMq7UkJG1GcqjOw+1KiCHQWv6ykAZlZLXjLE=; fh=RMDab8LvI1mIQlxxkuz9N6IcHOPsb2Gul5zONscELgI=; b=aWAgx/AssOIgfaNQor6Kgfg9U+52GXxFmHakOq3M+xL9gUJGUipucx5M0jNJj/dg6C YbTrthIUackH/VP67p91AwGAuHXxt9rrHitL4b9vcfmtM06JJk4LJpwJjkrYHO2qOrxv ptoejV/4hz0lX1FhrwH/RoPFvbUKY60/lRyN0/dkR2Jx2m0My3DVakGKIdH5tnEyyYLm v1kif1XF9PXHQC9r2xyNNn6N+gKHtYOOSuKRNdGQQpFCq9R9Y+f92PFU1V31R1JSZcRH DVNLa2FscvKySchpiWvhyri6QWGgEjt73JPx1oeEXB2ajYD3n5jeOgiaUB16uIhjtaWo /TKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=yukWixft; spf=pass (google.com: domain of linux-kernel+bounces-14820-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14820-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 3-20020ac85743000000b00427eb87503asi14860720qtx.436.2024.01.02.13.00.46 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 13:00:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14820-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=yukWixft; spf=pass (google.com: domain of linux-kernel+bounces-14820-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14820-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A06C21C20C9C for <ouuuleilei@gmail.com>; Tue, 2 Jan 2024 21:00:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 645F3171B3; Tue, 2 Jan 2024 21:00:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="yukWixft" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7175D168C8 for <linux-kernel@vger.kernel.org>; Tue, 2 Jan 2024 21:00:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--almasrymina.bounces.google.com Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-5e6fe91c706so163150627b3.2 for <linux-kernel@vger.kernel.org>; Tue, 02 Jan 2024 13:00:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704229202; x=1704834002; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=Ec50JyuVMq7UkJG1GcqjOw+1KiCHQWv6ykAZlZLXjLE=; b=yukWixft/gkFujUNF0xmBp23Th7d4rlqFaWCkVP8nBPNm1Md/GHTkIWieRI/7752f3 KtT31mGgq27D7TPIRK4h3ZpY6UZD91uoOUAzaAKMr8b26IclephxMGo7B9pC3lFpYofO jfzENcP2K9zkFB73+6eBhsnmsXOcv0xX4BqJ1G1qzUspbD5i7jOSL5Kr2qy/rGaKeG6x PpV1UHKJS3yIQY6VHwiiO+3R61E+nD1+xdXX5cjfUL+zc4Hv7XQbS+Qc7PkDQhVfZthr PA/4YXL+kjyIcoFZ1Cftx51p92naNoKHKyoh1peHTH5SxIaTc8416f0Pkyr0QyShromI SkKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704229202; x=1704834002; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Ec50JyuVMq7UkJG1GcqjOw+1KiCHQWv6ykAZlZLXjLE=; b=DCmk+MXOnSvgsXi4PM4ggIhb+aD/frUstbRz46QPFNHXBAY2d/oLJGpXxqruDsNeix YCVAC/YccPVufsE6imqyNCJDeeOD090EZFHG+ZSDRG3245TNnD7ypgw/goV9K85RFAOO clYScs4+TZbl2gtN4hpxVdFmb4Woydv4oBJvvIJSWEuMtJMzhi8WCEjZA592crxU62Zh ITkbNkOckUHEfCrLl02sMDy9rabJr0GTNfanxquYbTn3pBqxLQhnbiLpT+f0nSHTjo1A QTaPLgbyaqvdA3uuGZ7NfuLLbTd2idYgOvQMTYgHH5WjTF+nBeNVIdvu+uFlIvfj/gke dhCg== X-Gm-Message-State: AOJu0Yw6XI4g9HApv7G5ONsgD7X+saqQsG/nIh4gXuNlEnDbwBY5hS5X Vl9SV5OvX24NoTKyo16XageYcvcb9/UZGnjM+ul3qi/X X-Received: from almasrymina.svl.corp.google.com ([2620:15c:2c4:200:9a04:c262:c978:d762]) (user=almasrymina job=sendgmr) by 2002:a05:6902:1369:b0:db5:4692:3ab7 with SMTP id bt9-20020a056902136900b00db546923ab7mr7174078ybb.8.1704229202435; Tue, 02 Jan 2024 13:00:02 -0800 (PST) Date: Tue, 2 Jan 2024 12:59:58 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog Message-ID: <20240102205959.794513-1-almasrymina@google.com> Subject: [PATCH net-next v3] net: kcm: fix direct access to bv_len From: Mina Almasry <almasrymina@google.com> To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mina Almasry <almasrymina@google.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787013886506726959 X-GMAIL-MSGID: 1787013886506726959 |
Series |
[net-next,v3] net: kcm: fix direct access to bv_len
|
|
Commit Message
Mina Almasry
Jan. 2, 2024, 8:59 p.m. UTC
Minor fix for kcm: code wanting to access the fields inside an skb
frag should use the skb_frag_*() helpers, instead of accessing the
fields directly.
Signed-off-by: Mina Almasry <almasrymina@google.com>
---
net/kcm/kcmsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Tue, 2 Jan 2024 12:59:58 -0800 you wrote: > Minor fix for kcm: code wanting to access the fields inside an skb > frag should use the skb_frag_*() helpers, instead of accessing the > fields directly. > > Signed-off-by: Mina Almasry <almasrymina@google.com> > > > [...] Here is the summary with links: - [net-next,v3] net: kcm: fix direct access to bv_len https://git.kernel.org/netdev/net-next/c/b15a4cfe100b You are awesome, thank you!
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c index 65d1f6755f98..1184d40167b8 100644 --- a/net/kcm/kcmsock.c +++ b/net/kcm/kcmsock.c @@ -634,7 +634,7 @@ static int kcm_write_msgs(struct kcm_sock *kcm) msize = 0; for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) - msize += skb_shinfo(skb)->frags[i].bv_len; + msize += skb_frag_size(&skb_shinfo(skb)->frags[i]); iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, skb_shinfo(skb)->frags, skb_shinfo(skb)->nr_frags,