Commit 13d4109d authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: i2o fixed

Fixes for direct dereferencing of userland pointers in i2o_config.c
parent bec737de
...@@ -857,9 +857,13 @@ static int ioctl_passthru(unsigned long arg) ...@@ -857,9 +857,13 @@ static int ioctl_passthru(unsigned long arg)
int sg_index = 0; int sg_index = 0;
u32 i = 0; u32 i = 0;
ulong p = 0; ulong p = 0;
unsigned int iop;
c = i2o_find_controller(cmd->iop); if (get_user(iop, &cmd->iop) || get_user(user_msg, &cmd->msg))
if(!c) return -EFAULT;
c = i2o_find_controller(iop);
if (!c)
return -ENXIO; return -ENXIO;
memset(&msg, 0, MSG_FRAME_SIZE*4); memset(&msg, 0, MSG_FRAME_SIZE*4);
......
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