From: Alex Elder Date: Sat, 22 Nov 2014 01:29:14 +0000 (-0600) Subject: greybus: handle data send errors in workqueue X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1834 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=583c3117a4d36499adfe6de186826d59f5c4d788;p=karo-tx-linux.git greybus: handle data send errors in workqueue The data sent callback can execute in atomic context. If an error occurred, we shouldn't be completing the operation right then and there. Instead, hand it off to the operation workqueue to complete the operation. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 4e4fa8b0123c..9ad714eb773c 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -506,9 +506,8 @@ greybus_data_sent(struct greybus_host_device *hd, void *header, int status) /* XXX Right now we assume we're an outgoing request */ message = gb_hd_message_find(hd, header); operation = message->operation; - gb_connection_err(operation->connection, "send error %d\n", status); operation->errno = status; - gb_operation_complete(operation); + queue_work(gb_operation_workqueue, &operation->work); } EXPORT_SYMBOL_GPL(greybus_data_sent);