Skip to contentSkip to conversation

media: v4l: async: Properly re-initialise notifier entry in unregister

PATCH Superseded Sakari Ailus 1 participant 1 message Apr 10, 2024

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 media: v4l: async: Properly re-initialise notifier entry in unregister

The notifier_entry of a notifier is not re-initialised after unregistering the notifier. This leads to dangling pointers being left there so use list_del_init() to return the notifier_entry an empty list.

Fixes b8ec754ae4c5 ("media: v4l: async: Set v4l2_device and subdev in async notifier init")
Cc <[email protected]> # for 6.6 and later
---
 drivers/media/v4l2-core/v4l2-async.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/v4l2-core/v4l2-async.c +1 -1
index 2ff35d5d60f2..4bb073587817 100644
@@ -635,7 +635,7 @@ __v4l2_async_nf_unregister(struct v4l2_async_notifier *notifier)
 
 	v4l2_async_nf_unbind_all_subdevs(notifier);
 
-	list_del(&notifier->notifier_entry);
+	list_del_init(&notifier->notifier_entry);
 }
 
 void v4l2_async_nf_unregister(struct v4l2_async_notifier *notifier)
Signature · 1 line
2.39.2