fcntl: Cast commands with int args explicitly
authorLuca Vizzarro <Luca.Vizzarro@arm.com>
Thu, 2 Feb 2023 11:58:31 +0000 (11:58 +0000)
committerChristian Brauner <brauner@kernel.org>
Mon, 10 Jul 2023 12:36:11 +0000 (14:36 +0200)
commitbccb5c397fbfe348e22c045f5e09c35780edb817
tree7a923dd44274aeab30a601c581f64533f5476d71
parent576d498e0ac5caff2d9f6312573ab54d98f12d32
fcntl: Cast commands with int args explicitly

According to the fcntl API specification commands that expect an
integer, hence not a pointer, always take an int and not long. In
order to avoid access to undefined bits, we should explicitly cast
the argument to int.

Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: Kevin Brodsky <Kevin.Brodsky@arm.com>
Cc: Vincenzo Frascino <Vincenzo.Frascino@arm.com>
Cc: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: David Laight <David.Laight@ACULAB.com>
Cc: Mark Rutland <Mark.Rutland@arm.com>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-morello@op-lists.linaro.org
Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
Message-Id: <20230414152459.816046-2-Luca.Vizzarro@arm.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/fcntl.c
include/linux/fs.h