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

    virtio_balloon: set DRIVER_OK before using device

to the 3.19-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:
     virtio_balloon-set-driver_ok-before-using-device.patch
and it can be found in the queue-3.19 subdirectory.

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


>From 88660f7fb94cda1f8f63ee92bfcd0db39a6361e2 Mon Sep 17 00:00:00 2001
From: "Michael S. Tsirkin" <[email protected]>
Date: Thu, 5 Mar 2015 13:24:41 +1030
Subject: virtio_balloon: set DRIVER_OK before using device

From: "Michael S. Tsirkin" <[email protected]>

commit 88660f7fb94cda1f8f63ee92bfcd0db39a6361e2 upstream.

virtio spec requires that all drivers set DRIVER_OK
before using devices. While balloon isn't yet
included in the virtio 1 spec, previous spec versions
also required this.

virtio balloon might violate this rule: probe calls
kthread_run before setting DRIVER_OK, which might run
immediately and cause balloon to inflate/deflate.

To fix, call virtio_device_ready before running the kthread.

Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/virtio/virtio_balloon.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -494,6 +494,8 @@ static int virtballoon_probe(struct virt
        if (err < 0)
                goto out_oom_notify;
 
+       virtio_device_ready(vdev);
+
        vb->thread = kthread_run(balloon, vb, "vballoon");
        if (IS_ERR(vb->thread)) {
                err = PTR_ERR(vb->thread);


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

queue-3.19/virtio-balloon-do-not-call-blocking-ops-when-task_running.patch
queue-3.19/virtio_balloon-set-driver_ok-before-using-device.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to