]> git.baikalelectronics.ru Git - kernel.git/commit
xen/xenbus: fix locking
authorJuergen Gross <jgross@suse.com>
Thu, 5 Mar 2020 10:03:23 +0000 (11:03 +0100)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 5 Mar 2020 15:42:23 +0000 (09:42 -0600)
commitfe8518c6f129160dde7dca848ce3b4efb591cee5
tree57ffc62e0497d2f1be6ad89f9abd7c8adbdde722
parentb6665103a6346be71f0bd21627e12c92904792f5
xen/xenbus: fix locking

Commit e6756d33f53e76 ("xenbus/backend: Protect xenbus callback with
lock") introduced a bug by holding a lock while calling a function
which might schedule.

Fix that by using a semaphore instead.

Fixes: e6756d33f53e76 ("xenbus/backend: Protect xenbus callback with lock")
Signed-off-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20200305100323.16736-1-jgross@suse.com
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/xenbus/xenbus_probe.c
drivers/xen/xenbus/xenbus_probe_backend.c
include/xen/xenbus.h