summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-04-07 09:58:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-04-07 09:58:01 -0700
commit50bdd7a0c99afc78e8dd9403c10b947efc4af4f5 (patch)
treedcb9b3121c0226741533836e60048c09d9a776ed /drivers
parent5380e5644afbba9e3d229c36771134976f05c91e (diff)
parentac4cde398a96c1d28b1c28a0f69b6efd892a1c8a (diff)
downloadlinux-50bdd7a0c99afc78e8dd9403c10b947efc4af4f5.tar.bz2
Merge tag 'for-linus-4.11b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull Xen fix from Juergen Gross: "A fix for error path cleanup in the xenbus handler" * tag 'for-linus-4.11b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xenbus: remove transaction holder from list before freeing
Diffstat (limited to 'drivers')
-rw-r--r--drivers/xen/xenbus/xenbus_dev_frontend.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c
index 1f4733b80c87..f3b089b7c0b6 100644
--- a/drivers/xen/xenbus/xenbus_dev_frontend.c
+++ b/drivers/xen/xenbus/xenbus_dev_frontend.c
@@ -442,8 +442,10 @@ static int xenbus_write_transaction(unsigned msg_type,
return xenbus_command_reply(u, XS_ERROR, "ENOENT");
rc = xenbus_dev_request_and_reply(&u->u.msg, u);
- if (rc)
+ if (rc && trans) {
+ list_del(&trans->list);
kfree(trans);
+ }
out:
return rc;