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>
This commit is contained in:
parent
169d1338ed
commit
7d5e0e5954
1 changed files with 3 additions and 0 deletions
|
@ -1204,6 +1204,9 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
*slots = mei_count_empty_write_slots(dev);
|
*slots = mei_count_empty_write_slots(dev);
|
||||||
|
if (*slots <= 0)
|
||||||
|
return -EMSGSIZE;
|
||||||
|
|
||||||
/* complete all waiting for write CB */
|
/* complete all waiting for write CB */
|
||||||
dev_dbg(&dev->pdev->dev, "complete all waiting for write cb.\n");
|
dev_dbg(&dev->pdev->dev, "complete all waiting for write cb.\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue