Commit 7d5e0e59 authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

mei: mei_irq_thread_write_handler check for overflow

check for overflow when retrieving empty write slots
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 169d1338
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment