From patchwork Fri Aug 23 12:20:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Massimiliano Pellizzer X-Patchwork-Id: 1976023 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WqzhX09ldz1ybW for ; Fri, 23 Aug 2024 22:21:47 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1shTIU-0006QY-Qc; Fri, 23 Aug 2024 12:21:42 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1shTIR-0006NW-KA for kernel-team@lists.ubuntu.com; Fri, 23 Aug 2024 12:21:39 +0000 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 6E2193F327 for ; Fri, 23 Aug 2024 12:21:39 +0000 (UTC) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42807a05413so16542025e9.2 for ; Fri, 23 Aug 2024 05:21:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724415697; x=1725020497; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h5FAqNYCS+Pzt5oDP1ng1Q0+wlDZwY7NNaaLmDpXjl0=; b=c4WOla0eHYOPVLjkzpJk721SAHXYoSsLST4MrM5XvfAtXorX0Cn5yYTydn0hoQtuiM KJQ+9BxNjBbqKXf0hn+pu6cIKmOyk20w9ndHOnikCrAaQAG7MU+xAzH7wdTyW6FU0GLI g6iig5rFicQJOCK8jtYI34VijZxa1zxOGK6ytZrq6yjU42WO4262IAA3cjQAwiN4HCE0 RcJc0JUldDJJzALQSzH4I0InQ3UDNfrI+KJAa2u95vID6V4OkM5qukdfinPHU9IxSVcw JDGqEYi9SUm3oeL7QmNxaffn1sLU3sqKPxBBRaQeP2DFNxWdmWSevXsHIolJQ6eOrf5z zYtg== X-Gm-Message-State: AOJu0YwYn/u922kPq5OoloBtT3Ai6Nno0TSkGgx35ewG+isxeJTE6AIq mxetIbo4/VgMyVg9hd932RfUsLk7a3wvVDHsng+DzIvTVeRiytg7kKO5i5KdW7Q4MpOTGI3kYYV b/VxxktLf7HMJWDM3UgrrA4teqIt+bbBtlfFn7EMDkkZmR+C3b8mPuKxzJ6s8zrEbudmA08JkQC 1kt/zAHw0caQ== X-Received: by 2002:a05:600c:5125:b0:426:5216:3247 with SMTP id 5b1f17b1804b1-42acc8d0760mr13627015e9.6.1724415697603; Fri, 23 Aug 2024 05:21:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfX2/SpoUkLvXEHjeWszvZfas/potJJHWlMMk6GYGRMCNpDJXKh9KwUKKQjaeiVBP2K6plbA== X-Received: by 2002:a05:600c:5125:b0:426:5216:3247 with SMTP id 5b1f17b1804b1-42acc8d0760mr13626805e9.6.1724415697007; Fri, 23 Aug 2024 05:21:37 -0700 (PDT) Received: from framework-canonical.station (net-93-71-65-44.cust.vodafonedsl.it. [93.71.65.44]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37308265698sm4010488f8f.106.2024.08.23.05.21.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 05:21:36 -0700 (PDT) From: Massimiliano Pellizzer To: kernel-team@lists.ubuntu.com Subject: [SRU][N][PATCH 2/2] f2fs: Add inline to f2fs_build_fault_attr() stub Date: Fri, 23 Aug 2024 14:20:41 +0200 Message-ID: <20240823122123.27326-7-massimiliano.pellizzer@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240823122123.27326-1-massimiliano.pellizzer@canonical.com> References: <20240823122123.27326-1-massimiliano.pellizzer@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Nathan Chancellor commit 0d8968287a1cf7b03d07387dc871de3861b9f6b9 upstream. When building without CONFIG_F2FS_FAULT_INJECTION, there is a warning from each file that includes f2fs.h because the stub for f2fs_build_fault_attr() is missing inline: In file included from fs/f2fs/segment.c:21: fs/f2fs/f2fs.h:4605:12: warning: 'f2fs_build_fault_attr' defined but not used [-Wunused-function] 4605 | static int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned long rate, | ^~~~~~~~~~~~~~~~~~~~~ Add the missing inline to resolve all of the warnings for this configuration. Fixes: 4ed886b187f4 ("f2fs: check validation of fault attrs in f2fs_build_fault_attr()") Signed-off-by: Nathan Chancellor Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 72d0e1dec7914b36beb4f3c7fe3a4c01cbb018ee linux-6.9.y) CVE-2024-42160 Signed-off-by: Massimiliano Pellizzer --- fs/f2fs/f2fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index ec544ab5307d..93303ad29271 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -4606,8 +4606,8 @@ static inline bool f2fs_need_verity(const struct inode *inode, pgoff_t idx) extern int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned long rate, unsigned long type); #else -static int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned long rate, - unsigned long type) +static inline int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, + unsigned long rate, unsigned long type) { return 0; }