From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Vasily Averin <vvs@openvz.org>,
Christian Brauner <brauner@kernel.org>,
Christoph Hellwig <hch@lst.de>, Jan Kara <jack@suse.cz>,
Sasha Levin <sashal@kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: [PATCH AUTOSEL 5.17 43/48] fanotify: fix incorrect fmode_t casts
Date: Wed, 1 Jun 2022 09:54:16 -0400 [thread overview]
Message-ID: <20220601135421.2003328-43-sashal@kernel.org> (raw)
In-Reply-To: <20220601135421.2003328-1-sashal@kernel.org>
From: Vasily Averin <vvs@openvz.org>
[ Upstream commit dccd855771b37820b6d976a99729c88259549f85 ]
Fixes sparce warnings:
fs/notify/fanotify/fanotify_user.c:267:63: sparse:
warning: restricted fmode_t degrades to integer
fs/notify/fanotify/fanotify_user.c:1351:28: sparse:
warning: restricted fmode_t degrades to integer
FMODE_NONTIFY have bitwise fmode_t type and requires __force attribute
for any casts.
Signed-off-by: Vasily Averin <vvs@openvz.org>
Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/9adfd6ac-1b89-791e-796b-49ada3293985@openvz.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/notify/fanotify/fanotify_user.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index f2a1947ec5ee..ead37db01ab5 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -264,7 +264,7 @@ static int create_fd(struct fsnotify_group *group, struct path *path,
* originally opened O_WRONLY.
*/
new_file = dentry_open(path,
- group->fanotify_data.f_flags | FMODE_NONOTIFY,
+ group->fanotify_data.f_flags | __FMODE_NONOTIFY,
current_cred());
if (IS_ERR(new_file)) {
/*
@@ -1329,7 +1329,7 @@ SYSCALL_DEFINE2(fanotify_init, unsigned int, flags, unsigned int, event_f_flags)
(!(fid_mode & FAN_REPORT_NAME) || !(fid_mode & FAN_REPORT_FID)))
return -EINVAL;
- f_flags = O_RDWR | FMODE_NONOTIFY;
+ f_flags = O_RDWR | __FMODE_NONOTIFY;
if (flags & FAN_CLOEXEC)
f_flags |= O_CLOEXEC;
if (flags & FAN_NONBLOCK)
--
2.35.1
next prev parent reply other threads:[~2022-06-01 14:14 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 13:53 [PATCH AUTOSEL 5.17 01/48] IB/rdmavt: add missing locks in rvt_ruc_loopback Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 02/48] PCI/ASPM: Make Intel DG2 L1 acceptable latency unlimited Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 03/48] ARM: dts: ox820: align interrupt controller node name with dtschema Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 04/48] ARM: dts: socfpga: " Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 05/48] ARM: dts: s5pv210: align DMA channels " Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 06/48] ASoC: amd: Add driver data to acp6x machine driver Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 07/48] arm64: dts: qcom: msm8994: Fix the cont_splash_mem address Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 08/48] arm64: dts: qcom: msm8994: Fix BLSP[12]_DMA channels count Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 09/48] PM / devfreq: rk3399_dmc: Disable edev on remove() Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 10/48] crypto: ccree - use fine grained DMA mapping dir Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 11/48] crypto: qat - fix off-by-one error in PFVF debug print Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 12/48] soc: ti: ti_sci_pm_domains: Check for null return of devm_kcalloc Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 13/48] fs: jfs: fix possible NULL pointer dereference in dbFree() Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 14/48] arm64: dts: qcom: sdm845-xiaomi-beryllium: fix typo in panel's vddio-supply property Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 15/48] arm64: Expand ESR_ELx_WFx_ISS_TI to match its ARMv8.7 definition Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 16/48] ALSA: usb-audio: Add quirk bits for enabling/disabling generic implicit fb Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 17/48] ALSA: usb-audio: Move generic implicit fb quirk entries into quirks.c Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 18/48] ARM: OMAP1: clock: Fix UART rate reporting algorithm Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 19/48] selftests/resctrl: Change the default limited time to 120 seconds Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 20/48] powerpc/fadump: Fix fadump to work with a different endian capture kernel Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 21/48] fat: add ratelimit to fat*_ent_bread() Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 22/48] pinctrl: renesas: rzn1: Fix possible null-ptr-deref in sh_pfc_map_resources() Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 23/48] ARM: versatile: Add missing of_node_put in dcscb_init Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 24/48] ARM: dts: exynos: add atmel,24c128 fallback to Samsung EEPROM Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 25/48] arm64: dts: qcom: sc7280-idp: Configure CTS pin to bias-bus-hold for bluetooth Sasha Levin
2022-06-01 13:53 ` [PATCH AUTOSEL 5.17 26/48] ARM: hisi: Add missing of_node_put after of_find_compatible_node Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 27/48] cpufreq: Avoid unnecessary frequency updates due to mismatch Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 28/48] PCI: microchip: Add missing chained_irq_enter()/exit() calls Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 29/48] powerpc/rtas: Keep MSR[RI] set when calling RTAS Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 30/48] PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store() Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 31/48] PCI: cadence: Clear FLR in device capabilities register Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 32/48] KVM: PPC: Book3S HV Nested: L2 LPCR should inherit L1 LPES setting Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 33/48] alpha: fix alloc_zeroed_user_highpage_movable() Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 34/48] KVM: arm64: vgic: Do not ignore vgic_its_restore_cte failures Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 35/48] cifs: fix signed integer overflow when fl_end is OFFSET_MAX Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 36/48] tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 37/48] cifs: return ENOENT for DFS lookup_cache_entry() Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 38/48] powerpc/powernv/vas: Assign real address to rx_fifo in vas_rx_win_attr Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 39/48] powerpc/xics: fix refcount leak in icp_opal_init() Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 40/48] powerpc/powernv: fix missing of_node_put in uv_init() Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 41/48] macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 42/48] powerpc/iommu: Add missing of_node_put in iommu_init_early_dart Sasha Levin
2022-06-01 13:54 ` Sasha Levin [this message]
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 44/48] smb3: check for null tcon Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 45/48] RDMA/hfi1: Prevent panic when SDMA is disabled Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 46/48] cifs: do not use tcpStatus after negotiate completes Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 47/48] Input: gpio-keys - cancel delayed work only in case of GPIO Sasha Levin
2022-06-01 13:54 ` [PATCH AUTOSEL 5.17 48/48] drm: fix EDID struct for old ARM OABI format Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220601135421.2003328-43-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=brauner@kernel.org \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vvs@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®