Commit:     010904cbed3db3464213fbc602802cc6f53e56e1
Parent:     1725d71d992f5947bdd5b4f9a30fe8a05571fe66
Author:     Vasily Averin <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 04:04:25 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 17 10:23:06 2007 -0700

    wrong memory access in i2o_block_device_lock()
    This patch fixes access to memory that has not been allocated:
    i2o_msg_get_wait() can returns errors different from I2O_QUEUE_EMPTY.  But 
    result is checked only against this code.  If it is not I2O_QUEUE_EMPTY then
    we dereference the error code as the pointer later.
    Signed-off-by: Vasily Averin <[EMAIL PROTECTED]>
    Acked-by: Alan Cox <[EMAIL PROTECTED]>
    Cc: Markus Lidel <[EMAIL PROTECTED]>
    Acked-by: Kirill Korotaev <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/message/i2o/i2o_block.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c
index b17c4b2..64a52bd 100644
--- a/drivers/message/i2o/i2o_block.c
+++ b/drivers/message/i2o/i2o_block.c
@@ -215,7 +215,7 @@ static int i2o_block_device_lock(struct i2o_device *dev, 
u32 media_id)
        struct i2o_message *msg;
        msg = i2o_msg_get_wait(dev->iop, I2O_TIMEOUT_MESSAGE_GET);
-       if (IS_ERR(msg) == I2O_QUEUE_EMPTY)
+       if (IS_ERR(msg))
                return PTR_ERR(msg);
        msg->u.head[0] = cpu_to_le32(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to