]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mei: ignore client writing state during cb completion
authorAlexander Usyskin <alexander.usyskin@intel.com>
Tue, 1 Apr 2014 20:50:41 +0000 (23:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 May 2014 14:59:25 +0000 (07:59 -0700)
commit360fec6392d511b059562ac629b600fadc3cd77b
treea799e4bdb026a275ccc508f9a77b75783920a6e8
parent5716684805259aec90a6dc3d6b28340826d1e2ad
mei: ignore client writing state during cb completion

commit 34ec43661fe8f1977dd0f05353302ae2ed10aabb upstream.

Ignore client writing state during cb completion to fix a memory
leak.

When moving cbs to the completion list we should not look at
writing_state as this state can be already overwritten by next
write, the fact that a cb is on the write waiting list means
that it was already written to the HW and we can safely complete it.

Same pays for wait in poll handler, we do not have to check the state
wake is done after completion list processing.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/interrupt.c
drivers/misc/mei/main.c