RDMA/core: Add missing list deletion on freeing event queue
When the uobject file scheme was revised to allow device disassociation
from the file it became possible for read() to still happen the driver
destroys the uobject.
The old clode code was not tolerant to concurrent read, and when it was
moved to the driver destroy it creates a bug.
Ensure the event_list is empty after driver destroy by adding the missing
list_del(). Otherwise read() can trigger a use after free and double
Fixes: f7c8416ccea5 ("RDMA/core: Simplify destruction of FD uobjects")
Signed-off-by: Michael Guralnik <firstname.lastname@example.org>
Reviewed-by: Yishai Hadas <email@example.com>
Signed-off-by: Leon Romanovsky <firstname.lastname@example.org>
Reviewed-by: Jason Gunthorpe <email@example.com>
Signed-off-by: Jason Gunthorpe <firstname.lastname@example.org>
1 file changed