From patchwork Fri Aug 23 12:20:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Massimiliano Pellizzer X-Patchwork-Id: 1976022 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 4WqzhW2tFWz20GB 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 1shTIS-0006OE-Hk; Fri, 23 Aug 2024 12:21:40 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1shTIP-0006MA-7t for kernel-team@lists.ubuntu.com; Fri, 23 Aug 2024 12:21:37 +0000 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (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-0.canonical.com (Postfix) with ESMTPS id F08533F297 for ; Fri, 23 Aug 2024 12:21:36 +0000 (UTC) Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4280f233115so17053395e9.2 for ; Fri, 23 Aug 2024 05:21:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724415696; x=1725020496; 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=xSo7pO9AyS6euBB2nFEG8IUZsyJ5EAJy/PX5643Gn6M=; b=vMn32ANnT64Pc6GO6p9tQN5xYUvRCXLZUe47blL3t94qw+Lj0/jwVhvZs7SrHgUzYX v0e7e15jNL3CXjKjq5fJSzxsZYoQpVy0L9w8dodDmVwyWyosotJ2yjpFGjqvyFJYob4Q YmuwtXJImzxKkGhGuPHrEyhwxorkUh/El4/GxqcBfrnxYNG0Rg/XrpmHy8F/4hxdTICL yqJ3xaisny8hqsrYslavS/SqOK9gDSK0B+YWct3OHz6r74RQZ+qZVitZw0HHyDqiQViw ax9CtoUntcyeMZ3j03nhjfZZOVyphsi5YEF7asFVShAUIZqteBRibwxWXxlIxzoliaKd Rd0g== X-Gm-Message-State: AOJu0YzRNuAAdn07i3hLOg/nvnuEMQbRttyIcHQI+B5NVSJ3QW9xmFXC gW5SAafDDfExD3MI0vpzcsX2/rzb+um959N7+bOvaaD/tqHgitpIafvc6Yx8Yku05o4dhMJANVf 8lk0HNaFnWTuZMoX1s9g34EtoQQqug8CaGXqU6Q56TjnQ4MsAIdUdjBYF3kN9RDiGR5tiJ+Wy/Y IFiU02LFxxDQ== X-Received: by 2002:a05:600c:35cd:b0:42a:a676:58f7 with SMTP id 5b1f17b1804b1-42acd55ed93mr12714015e9.13.1724415696284; Fri, 23 Aug 2024 05:21:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFyWtkYAMRZSbRK4tKRRiGx3c5RcBHzD42+CKIOwQ98BofdZ6VGApi0f6J73Kx/a+Kg0nmN2w== X-Received: by 2002:a05:600c:35cd:b0:42a:a676:58f7 with SMTP id 5b1f17b1804b1-42acd55ed93mr12713785e9.13.1724415695649; Fri, 23 Aug 2024 05:21:35 -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.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 05:21:35 -0700 (PDT) From: Massimiliano Pellizzer To: kernel-team@lists.ubuntu.com Subject: [SRU][J][PATCH 2/2] f2fs: Add inline to f2fs_build_fault_attr() stub Date: Fri, 23 Aug 2024 14:20:39 +0200 Message-ID: <20240823122123.27326-5-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 525ad8dd9a29bb662b58493d153b1b3c000228e3 linux-6.1.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 7d63a699ef71..5b1571eaaee1 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -4382,8 +4382,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; }