From: Tomas Winkler Date: Fri, 27 Jan 2017 14:32:44 +0000 (+0200) Subject: mei: amthif: allow the read completion after close X-Git-Tag: v4.11-rc1~118^2~58 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9ecdbc58f96bd145669510822bc44eafde3c7351;p=karo-tx-linux.git mei: amthif: allow the read completion after close The amthif client connection is shared over multiple file descriptors. In case a file descriptor was closed immediately after a write, the read credits should be still available so the pending reads can be cleaned from the queue, hence we cannot drop the control read list, this is done only upon connection close. Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index 466afb2611c6..2d553cd6d4d0 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c @@ -353,9 +353,9 @@ int mei_amthif_release(struct mei_device *dev, struct file *file) dev->iamthif_canceled = true; } + /* Don't clean ctrl_rd_list here, the reads has to be completed */ mei_clear_list(file, &dev->amthif_cmd_list.list); mei_clear_list(file, &cl->rd_completed); - mei_clear_list(file, &dev->ctrl_rd_list.list); return 0; }