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 <email@example.com>
Reviewed-by: Yishai Hadas <firstname.lastname@example.org>
Signed-off-by: Leon Romanovsky <email@example.com>
Reviewed-by: Jason Gunthorpe <firstname.lastname@example.org>
Signed-off-by: Jason Gunthorpe <email@example.com>
1 file changed