Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6774827rdb; Tue, 2 Jan 2024 13:00:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEWyEsUlpmYcL4xKY9sNJva+GaxzPUl2oQUx9m1PsFN2zYH0mlUhv2A4vmQCOEjZ5RniTj X-Received: by 2002:a17:906:5992:b0:a23:71ca:2bb4 with SMTP id m18-20020a170906599200b00a2371ca2bb4mr6893551ejs.144.1704229239914; Tue, 02 Jan 2024 13:00:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704229239; cv=none; d=google.com; s=arc-20160816; b=Y5C6OlicWYHSCv4vRqXJakp+I2zrqK6e4nyzBsx3qGvC+2Vh4tpjihX9SreIDDCGVs ZcyebVmDu8HrL9FkUjfF72OpYXJE4XSKWYtxtHBZI2gzI+EjPZQ92z0wefIT0u3xB85G /NWlIzehW9A32r5Ewdny6lD7jIYcbhbi3NqN7fniUZTLz1EVmz40HJOAOKSgdtQ74tCE Lv08iX8LeZSbCp9mBBUYwUSdsFzktTe94FTVLZBy2K86m/a2QSkA3uCSGHvDUAhaz4+Q VY6W/yyH2HDM31guv20zaWT6BSV4M8zHkW7qA24ivh2o9vDCMRmKBx/8hJWc80TM37Mg oOTA== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14820-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m20-20020a1709060d9400b00a280018d184si1810945eji.922.2024.01.02.13.00.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 13:00:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14820-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14820-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id A2DAD1F2363A for ; Tue, 2 Jan 2024 21:00:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92E49168D0; Tue, 2 Jan 2024 21:00:06 +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 ; 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 ; 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: List-Subscribe: List-Unsubscribe: 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 To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mina Almasry , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Content-Type: text/plain; charset="UTF-8" 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 --- net/kcm/kcmsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.43.0.472.g3155946c3a-goog