Re: [PATCH] nfs: fix undefined behavior in nfs_block_bits()

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

 



On 10 May 2024, at 16:24, Sergey Shtylyov wrote:

> 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@xxxxxxxxxxxxxxx
> Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>

Reviewed-by: Benjamin Coddington <bcodding@xxxxxxxxxx>

Ben





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux