diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2012-06-19 06:13:36 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-20 23:41:38 (GMT) |
commit | 7d5e0e59542ac452585e3a33abcad6e26b4dec4a (patch) | |
tree | 65ca4973cc393a66adff7def5401f0d84903f7ae /drivers/misc/mei | |
parent | 169d1338ed4ed91412761a77095a13b9992993ba (diff) | |
download | linux-fsl-qoriq-7d5e0e59542ac452585e3a33abcad6e26b4dec4a.tar.xz |
mei: mei_irq_thread_write_handler check for overflow
check for overflow when retrieving empty write slots
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r-- | drivers/misc/mei/interrupt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index 83e80bc..8e4dd74 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c @@ -1204,6 +1204,9 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list, return 0; } *slots = mei_count_empty_write_slots(dev); + if (*slots <= 0) + return -EMSGSIZE; + /* complete all waiting for write CB */ dev_dbg(&dev->pdev->dev, "complete all waiting for write cb.\n"); |