dnotify: Pass argument of fcntl_dirnotify as int
authorLuca Vizzarro <Luca.Vizzarro@arm.com>
Wed, 15 Feb 2023 15:50:05 +0000 (15:50 +0000)
committerChristian Brauner <brauner@kernel.org>
Mon, 10 Jul 2023 12:36:12 +0000 (14:36 +0200)
commitf4ae4081e5a871b4c4e2f802ccf73f8d69566073
tree4ab4c716633a1dc71f618c6d3b7405a1455b1456
parent515c5046650d8f56f93546d3867b64c1906162bc
dnotify: Pass argument of fcntl_dirnotify as int

The interface for fcntl expects the argument passed for the command
F_DIRNOTIFY to be of type int. The current code wrongly treats it as
a long. In order to avoid access to undefined bits, we should explicitly
cast the argument to int.

Cc: Jan Kara <jack@suse.cz>
Cc: Amir Goldstein <amir73il@gmail.com>
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
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
Message-Id: <20230414152459.816046-6-Luca.Vizzarro@arm.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/notify/dnotify/dnotify.c
include/linux/dnotify.h