Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319943
b: refs/heads/master
c: 261eba7
h: refs/heads/master
i:
  319941: 3cf1df8
  319939: 63c9d41
  319935: 1cee54b
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jul 31, 2012
1 parent d936dfb commit 9542b9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40251b8eb46e48c011939a3ddf056fe13a223319
refs/heads/master: 261eba73353edd48b0c0cb7aad59553dfc712ebc
7 changes: 7 additions & 0 deletions trunk/drivers/message/i2o/i2o_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,13 @@ static int i2o_cfg_parms(unsigned long arg, unsigned int type)
if (!dev)
return -ENXIO;

/*
* Stop users being able to try and allocate arbitary amounts
* of DMA space. 64K is way more than sufficient for this.
*/
if (kcmd.oplen > 65536)
return -EMSGSIZE;

ops = memdup_user(kcmd.opbuf, kcmd.oplen);
if (IS_ERR(ops))
return PTR_ERR(ops);
Expand Down

0 comments on commit 9542b9a

Please sign in to comment.