From: Randy Dunlap <[EMAIL PROTECTED]> Handle __copy_from_user() return value.
Noticed by inspection, not from build warning. Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]> --- drivers/message/i2o/i2o_config.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- linux-2619-rc5mm2.orig/drivers/message/i2o/i2o_config.c +++ linux-2619-rc5mm2/drivers/message/i2o/i2o_config.c @@ -265,7 +265,11 @@ static int i2o_cfg_swdl(unsigned long ar return -ENOMEM; } - __copy_from_user(buffer.virt, kxfer.buf, fragsize); + if (__copy_from_user(buffer.virt, kxfer.buf, fragsize)) { + i2o_msg_nop(c, msg); + i2o_dma_free(&c->pdev->dev, &buffer); + return -EFAULT; + } msg->u.head[0] = cpu_to_le32(NINE_WORD_MSG_SIZE | SGL_OFFSET_7); msg->u.head[1] = --- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/