greybus: operation: fix operation ordering
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 22 Jul 2015 15:49:17 +0000 (17:49 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 22 Jul 2015 18:10:33 +0000 (11:10 -0700)
Make the operation work queue single threaded.

The operation work queue was meant to be single threaded, but due to a
missing flag instead allowed one active task per CPU, something which
could lead to requests being processed out of order on SMP systems.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Tested-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/operation.c

index f2d12e87a50264ac3f421f39b4122b2134241f3f..e98fc656c98b5a06c74362965f970e9471197e97 100644 (file)
@@ -1043,7 +1043,8 @@ int __init gb_operation_init(void)
        if (!gb_operation_cache)
                goto err_destroy_message_cache;
 
-       gb_operation_workqueue = alloc_workqueue("greybus_operation", 0, 1);
+       gb_operation_workqueue = alloc_workqueue("greybus_operation",
+                               WQ_UNBOUND, 1);
        if (!gb_operation_workqueue)
                goto err_operation;