mei: mei_irq_thread_write_handler check for overflow
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 19 Jun 2012 06:13:36 +0000 (09:13 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2012 23:41:38 +0000 (16:41 -0700)
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>
drivers/misc/mei/interrupt.c

index 83e80bc08d776febbe32a421f9faf6c614f205b6..8e4dd74b96e5c24ba7c238fce440dca6e105aa4f 100644 (file)
@@ -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");
 
This page took 0.035579 seconds and 5 git commands to generate.