Skip to contentSkip to conversation

Patch "xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing)" has been added to the 3.10-stable tree

PATCH [email protected] 1 participant 1 message Nov 6, 2015

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing)

to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
xen-blkfront-check-for-null-drvdata-in-blkback_changed-xenbusstateclosing.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From a54c8f0f2d7df525ff997e2afe71866a1a013064 Mon Sep 17 00:00:00 2001

From: Cathy Avery <[email protected]>
Date: Fri, 2 Oct 2015 09:35:01 -0400
Subject: xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing)

From: Cathy Avery <[email protected]>

commit a54c8f0f2d7df525ff997e2afe71866a1a013064 upstream.

xen-blkfront will crash if the check to talk_to_blkback() in blkback_changed()(XenbusStateInitWait) returns an error. The driver data is freed and info is set to NULL. Later during the close process via talk_to_blkback's call to xenbus_dev_fatal() the null pointer is passed to and dereference in blkfront_closing.

---
 drivers/block/xen-blkfront.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/block/xen-blkfront.c +2 -1
@@ -1590,7 +1590,8 @@ static void blkback_changed(struct xenbu
 			break;
 		/* Missed the backend's Closing state -- fallthrough */
 	case XenbusStateClosing:
-		blkfront_closing(info);
+		if (info)
+			blkfront_closing(info);
 		break;
 	}
 }

Patches currently in stable-queue which might be from [email protected] are

queue-3.10/xen-blkfront-check-for-null-drvdata-in-blkback_changed-xenbusstateclosing.patch