xen/xenbus: reference count registered modules
[ Upstream commit 196748a276b4dee01177e6b7abcda27cd759de83 ] To prevent a PV driver module being removed whilst attached to its other end, and hence xenbus calling into potentially invalid text, take a reference on the module before calling the probe() method (dropping it if unsuccessful) and drop the reference after returning from the remove() method. Suggested-by:Jan Beulich <jbeulich@suse.com> Signed-off-by:
Paul Durrant <pdurrant@amazon.com> Reviewed-by:
Jan Beulich <jbeulich@suse.com> Reviewed-by:
Juergen Gross <jgross@suse.com> Signed-off-by:
Juergen Gross <jgross@suse.com> Stable-dep-of: afc545da381b ("xen: Fix the issue of resource not being properly released in xenbus_dev_probe()") Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading
Please register or sign in to comment