linux-stable/fs/nfs
Sergey Shtylyov 2997e2fb1c nfs: fix undefined behavior in nfs_block_bits()
commit 3c0a2e0b0a upstream.

Shifting *signed int* typed constant 1 left by 31 bits causes undefined
behavior. Specify the correct *unsigned long* type by using 1UL instead.

Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.

Cc: stable@vger.kernel.org
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:28:52 +02:00
..
blocklayout blocklayoutdriver: Fix reference leak of pnfs_device_node 2024-01-25 14:34:24 -08:00
filelayout pNFS/filelayout: Fix coalescing test for single DS 2023-01-24 07:17:58 +01:00
flexfilelayout NFS/pNFS: Report EINVAL errors from connect() to the server 2023-10-10 21:46:35 +02:00
Kconfig nfs: fix PNFS_FLEXFILE_LAYOUT Kconfig default 2021-03-30 14:35:21 +02:00
Makefile
cache_lib.c
cache_lib.h
callback.c
callback.h NFSv4.1: Fix uninitialised variable in devicenotify 2022-02-16 12:52:48 +01:00
callback_proc.c NFSv4/pNFS: Fix another issue with a list iterator pointing to the head 2022-04-15 14:18:21 +02:00
callback_xdr.c NFS: remove unneeded check in decode_devicenotify_args() 2022-04-15 14:18:19 +02:00
client.c nfs: make the rpc_stat per net namespace 2024-05-17 11:43:48 +02:00
delegation.c
delegation.h
dir.c NFS: LOOKUP_DIRECTORY is also ok with symlinks 2022-02-23 11:59:59 +01:00
direct.c NFS: swap-out must always use STABLE writes. 2022-04-15 14:18:36 +02:00
dns_resolve.c
dns_resolve.h
export.c
file.c NFS: Do not report flush errors in nfs_write_end() 2022-06-14 18:11:43 +02:00
fscache-index.c nfs: fscache: use timespec64 in inode auxdata 2020-05-20 08:20:23 +02:00
fscache.c NFSv4: Fix fscache cookie aux_data to ensure change_attr is included 2020-05-20 08:20:23 +02:00
fscache.h nfs: fscache: use timespec64 in inode auxdata 2020-05-20 08:20:23 +02:00
getroot.c
inode.c nfs: Handle error of rpc_proc_register() in nfs_net_init(). 2024-05-17 11:43:48 +02:00
internal.h nfs: fix undefined behavior in nfs_block_bits() 2024-06-16 13:28:52 +02:00
io.c
iostat.h
mount_clnt.c NFSv3: fix rpc receive buffer size for MOUNT call 2020-05-20 08:20:27 +02:00
namespace.c NFS: fix nfs_path in case of a rename retry 2020-11-05 11:43:24 +01:00
netns.h nfs: make the rpc_stat per net namespace 2024-05-17 11:43:48 +02:00
nfs.h
nfs2super.c
nfs2xdr.c NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN 2023-09-23 10:59:48 +02:00
nfs3_fs.h
nfs3acl.c nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl 2020-05-06 08:15:16 +02:00
nfs3client.c
nfs3proc.c nfs: fix acl memory leak of posix_acl_create() 2021-07-20 16:10:49 +02:00
nfs3super.c
nfs3xdr.c NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN 2023-09-23 10:59:48 +02:00
nfs4_fs.h NFSv4 expose nfs_parse_server_name function 2022-02-16 12:52:48 +01:00
nfs4client.c nfs4: Fix kmemleak when allocate slot failed 2022-11-10 17:57:49 +01:00
nfs4file.c NFSv4: Fix v4.0/v4.1 SEEK_DATA return -ENOTSUPP when set NFS_V4_2 config 2021-06-03 08:59:06 +02:00
nfs4getroot.c
nfs4idmap.c NFSv4: Fix races in the legacy idmapper upcall 2022-08-25 11:18:22 +02:00
nfs4idmap.h
nfs4namespace.c NFSv4 expose nfs_parse_server_name function 2022-02-16 12:52:48 +01:00
nfs4proc.c NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT 2024-01-25 14:34:24 -08:00
nfs4renewd.c NFSv4.0: nfs4_do_fsinfo() should not do implicit lease renewals 2020-02-14 16:34:11 -05:00
nfs4session.c
nfs4session.h
nfs4state.c NFSv4: Fix a nfs4_state_manager() race 2023-10-10 21:46:44 +02:00
nfs4super.c NFSv4: Fix a pNFS layout related use-after-free race when freeing the inode 2021-01-06 14:48:40 +01:00
nfs4sysctl.c
nfs4trace.c
nfs4trace.h NFS4: Trace state recovery operation 2023-10-10 21:46:44 +02:00
nfs4xdr.c NFSv4.2: Fix a memory stomp in decode_attr_security_label 2023-01-18 11:41:07 +01:00
nfs42.h
nfs42proc.c NFSv42: Fix pagecache invalidation after COPY/CLONE 2021-12-08 09:01:08 +01:00
nfs42xdr.c NFSv42: Don't fail clone() unless the OP_CLONE operation failed 2021-12-01 09:23:32 +01:00
nfsroot.c NFS: Fix an off by one in root_nfs_cat() 2024-03-26 18:22:24 -04:00
nfstrace.c
nfstrace.h NFS: nfs_xdr_status should record the procedure name 2020-10-01 13:18:09 +02:00
pagelist.c NFS: Don't corrupt the value of pg_bytes_written in nfs_do_recoalesce() 2021-06-03 08:59:06 +02:00
pnfs.c pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE 2022-06-22 14:11:21 +02:00
pnfs.h NFSv4/pNFS: Fix another issue with a list iterator pointing to the head 2022-04-15 14:18:21 +02:00
pnfs_dev.c NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info 2023-09-23 10:59:57 +02:00
pnfs_nfs.c pnfs/flexfiles: Fix misplaced barrier in nfs4_ff_layout_prepare_ds 2021-11-17 09:48:44 +01:00
proc.c
read.c
super.c NFS: Fix a race in __nfs_list_for_each_server() 2023-10-10 21:46:45 +02:00
symlink.c
sysctl.c
sysfs.c
sysfs.h
unlink.c
write.c NFS: Don't report errors from nfs_pageio_complete() more than once 2022-06-14 18:11:43 +02:00