* [bug report] mmu_notifiers: rename invalidate_range notifier
@ 2023-07-21 6:23 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2023-07-21 6:23 UTC (permalink / raw)
To: apopple; +Cc: linux-mm
Hello Alistair Popple,
The patch 828fe4085cae: "mmu_notifiers: rename invalidate_range
notifier" from Jul 19, 2023 (linux-next), leads to the following
Smatch static checker warning:
mm/mmu_notifier.c:1020 mmu_interval_notifier_insert_locked()
error: NULL dereference inside function __mmu_notifier_register()
mm/mmu_notifier.c:671 __mmu_notifier_register()
warn: variable dereferenced before check 'subscription' (see line 624)
mm/mmu_notifier.c
1010 unsigned long start, unsigned long length,
1011 const struct mmu_interval_notifier_ops *ops)
1012 {
1013 struct mmu_notifier_subscriptions *subscriptions =
1014 mm->notifier_subscriptions;
1015 int ret;
1016
1017 mmap_assert_write_locked(mm);
1018
1019 if (!subscriptions || !subscriptions->has_itree) {
--> 1020 ret = __mmu_notifier_register(NULL, mm);
subscription is NULL here
1021 if (ret)
1022 return ret;
1023 subscriptions = mm->notifier_subscriptions;
1024 }
1025 return __mmu_interval_notifier_insert(interval_sub, mm, subscriptions,
1026 start, length, ops);
1027 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-21 6:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-21 6:23 [bug report] mmu_notifiers: rename invalidate_range notifier Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox