[merged] nilfs2-fix-out-of-range-warning.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quilt patch titled
     Subject: nilfs2: fix out-of-range warning
has been removed from the -mm tree.  Its filename was
     nilfs2-fix-out-of-range-warning.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Arnd Bergmann <arnd@xxxxxxxx>
Subject: nilfs2: fix out-of-range warning
Date: Thu, 28 Mar 2024 15:30:44 +0100

clang-14 points out that v_size is always smaller than a 64KB page size if
that is configured by the CPU architecture:

fs/nilfs2/ioctl.c:63:19: error: result of comparison of constant 65536 with expression of type '__u16' (aka 'unsigned short') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
        if (argv->v_size > PAGE_SIZE)
            ~~~~~~~~~~~~ ^ ~~~~~~~~~

This is ok, so just shut up that warning with a cast.

Link: https://lkml.kernel.org/r/20240328143051.1069575-7-arnd@xxxxxxxxxx
Fixes: 3358b4aaa84f ("nilfs2: fix problems of memory allocation in ioctl")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Reviewed-by: Justin Stitt <justinstitt@xxxxxxxxxx>
Acked-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxx>
Cc: Bill Wendling <morbo@xxxxxxxxxx>
Cc: Christian Brauner <brauner@xxxxxxxxxx>
Cc: Jeff Layton <jlayton@xxxxxxxxxx>
Cc: Nathan Chancellor <nathan@xxxxxxxxxx>
Cc: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
Cc: Philipp Stanner <pstanner@xxxxxxxxxx>
Cc: Thorsten Blum <thorsten.blum@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/nilfs2/ioctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/nilfs2/ioctl.c~nilfs2-fix-out-of-range-warning
+++ a/fs/nilfs2/ioctl.c
@@ -60,7 +60,7 @@ static int nilfs_ioctl_wrap_copy(struct
 	if (argv->v_nmembs == 0)
 		return 0;
 
-	if (argv->v_size > PAGE_SIZE)
+	if ((size_t)argv->v_size > PAGE_SIZE)
 		return -EINVAL;
 
 	/*
_

Patches currently in -mm which might be from arnd@xxxxxxxx are

kcov-avoid-clang-out-of-range-warning.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux