Commit 08e8b3bb authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] Quota should not reference user addresses directly

(Stanford Checker, Chris Wright)
parent 9f897407
...@@ -221,12 +221,17 @@ asmlinkage long sys_quotactl(unsigned int cmd, const char *special, qid_t id, ca ...@@ -221,12 +221,17 @@ asmlinkage long sys_quotactl(unsigned int cmd, const char *special, qid_t id, ca
uint cmds, type; uint cmds, type;
struct super_block *sb = NULL; struct super_block *sb = NULL;
struct block_device *bdev; struct block_device *bdev;
char *tmp;
int ret = -ENODEV; int ret = -ENODEV;
cmds = cmd >> SUBCMDSHIFT; cmds = cmd >> SUBCMDSHIFT;
type = cmd & SUBCMDMASK; type = cmd & SUBCMDMASK;
bdev = lookup_bdev(special); tmp = getname(special);
if (IS_ERR(tmp))
return PTR_ERR(tmp);
bdev = lookup_bdev(tmp);
putname(tmp);
if (IS_ERR(bdev)) if (IS_ERR(bdev))
return PTR_ERR(bdev); return PTR_ERR(bdev);
sb = get_super(bdev); sb = get_super(bdev);
......
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