diff options
author | Vlastimil Babka <vbabka@suse.cz> | 2017-01-04 11:19:31 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-01-04 13:12:39 +0100 |
commit | ea8c585ee6dc4df65e410fcc8331716be87d3fb4 (patch) | |
tree | b1450843e56c79f1502b57e715292a2541824d72 | |
parent | cdb98c2698b4af287925abcba4d77d92af82a0c3 (diff) | |
download | linux-block-for-jens.tar.gz |
floppy: replace wrong kmalloc(GFP_USER) with GFP_KERNELfor-jens
The raw_cmd_copyin() function does a kmalloc() with GFP_USER, although the
allocated structure is obviously not mapped to userspace, just copied from/to.
In this case GFP_KERNEL is more appropriate, so let's use it, although in the
current implementation this does not manifest as any error.
Reported-by: Matthew Wilcox <mawilcox@linuxonhyperv.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/block/floppy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index a391a3cfb3fe6..184887af4b9fb 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -3119,7 +3119,7 @@ static int raw_cmd_copyin(int cmd, void __user *param, *rcmd = NULL; loop: - ptr = kmalloc(sizeof(struct floppy_raw_cmd), GFP_USER); + ptr = kmalloc(sizeof(struct floppy_raw_cmd), GFP_KERNEL); if (!ptr) return -ENOMEM; *rcmd = ptr; |