summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-04-07 18:58:01 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2017-04-07 18:58:01 +0200
commit50bdd7a0c99afc78e8dd9403c10b947efc4af4f5 (patch)
treedcb9b3121c0226741533836e60048c09d9a776ed /drivers
parentsysctl: don't print negative flag for proc_douintvec (diff)
parentxenbus: remove transaction holder from list before freeing (diff)
downloadlinux-50bdd7a0c99afc78e8dd9403c10b947efc4af4f5.tar.xz
linux-50bdd7a0c99afc78e8dd9403c10b947efc4af4f5.zip
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;