]> git.baikalelectronics.ru Git - kernel.git/commit
xenbus: req->err should be updated before req->state
authorDongli Zhang <dongli.zhang@oracle.com>
Tue, 3 Mar 2020 22:14:23 +0000 (14:14 -0800)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 5 Mar 2020 15:42:01 +0000 (09:42 -0600)
commitb6665103a6346be71f0bd21627e12c92904792f5
tree647cbd1ff16e7cc558524d766b95f7e913b16494
parent079dc66beea6070065f95d1977b5391570f2f7d7
xenbus: req->err should be updated before req->state

This patch adds the barrier to guarantee that req->err is always updated
before req->state.

Otherwise, read_reply() would not return ERR_PTR(req->err) but
req->body, when process_writes()->xb_write() is failed.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Link: https://lore.kernel.org/r/20200303221423.21962-2-dongli.zhang@oracle.com
Reviewed-by: Julien Grall <jgrall@amazon.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/xenbus/xenbus_comms.c