]> git.baikalelectronics.ru Git - kernel.git/commit
[media] v4l2-event: Remove pending events from fh event queue when unsubscribing
authorHans de Goede <hdegoede@redhat.com>
Wed, 26 Oct 2011 08:40:27 +0000 (05:40 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 8 Nov 2011 12:29:29 +0000 (10:29 -0200)
commit14af5d7310d10b332f83e4889f46abf21ca2b0b8
treebc50ec4ccf077a2753ef23a4d95c1f182b6a66a4
parent7cdce32c58a4aac321dd5d1db7159b587fad532c
[media] v4l2-event: Remove pending events from fh event queue when unsubscribing

The kev pointers inside the pending events queue (the available queue) of the
fh point to data inside the sev, unsubscribing frees the sev, thus making these
pointers point to freed memory!

This patch fixes these dangling pointers in the available queue by removing
all matching pending events on unsubscription.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-event.c