Skip to content

Commit

Permalink
mei: mei_irq_thread_write_handler check for overflow
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Jun 20, 2012
1 parent 169d133 commit 7d5e0e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/misc/mei/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit 7d5e0e5

Please sign in to comment.