Re: [Linux-kernel-mentees] [PATCH v2] fs: cramfs_fs.h: Fix shifting signed 32-bit value by 31 bits problem

From: Greg KH
Date: Tue Jun 18 2019 - 12:13:54 EST

On Tue, Jun 18, 2019 at 05:19:47PM +0530, Puranjay Mohan wrote:
> Fix CRAMFS_BLK_FLAG_UNCOMPRESSED to use "U" cast to avoid shifting signed
> 32-bit value by 31 bits problem. This isn't a problem for kernel builds
> with gcc.
> This could be problem since this header is part of public API which
> could be included for builds using compilers that don't handle this
> condition safely resulting in undefined behavior.
> Signed-off-by: Puranjay Mohan <puranjay12@xxxxxxxxx>

Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

You should resend this and cc: Nicolas Pitre <nico@xxxxxxxxxxx> as he is
the cramfs maintainer.


greg k-h