Patch "nilfs2: fix out-of-range warning" has been added to the 6.8-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    nilfs2: fix out-of-range warning

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nilfs2-fix-out-of-range-warning.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5b7007bfe9dac0e804c6d45dfc90f006f35db870
Author: Arnd Bergmann <arnd@xxxxxxxx>
Date:   Thu Mar 28 15:30:44 2024 +0100

    nilfs2: fix out-of-range warning
    
    [ Upstream commit c473bcdd80d4ab2ae79a7a509a6712818366e32a ]
    
    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.
    
    Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
    Link: https://lore.kernel.org/r/20240328143051.1069575-7-arnd@xxxxxxxxxx
    Fixes: 3358b4aaa84f ("nilfs2: fix problems of memory allocation in ioctl")
    Acked-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxx>
    Reviewed-by: Justin Stitt <justinstitt@xxxxxxxxxx>
    Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index cfb6aca5ec383..d6e3f20e8872e 100644
--- a/fs/nilfs2/ioctl.c
+++ b/fs/nilfs2/ioctl.c
@@ -60,7 +60,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs,
 	if (argv->v_nmembs == 0)
 		return 0;
 
-	if (argv->v_size > PAGE_SIZE)
+	if ((size_t)argv->v_size > PAGE_SIZE)
 		return -EINVAL;
 
 	/*




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux