projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ARM64: configs: rockchip_linux: enable rk3328 internal codec
[firefly-linux-kernel-4.4.55.git]
/
block
/
bsg.c
diff --git
a/block/bsg.c
b/block/bsg.c
index d214e929ce1855bb653808f03482580b45b5344e..b9a53615bdef4945748057e5efbfef56c5cb4847 100644
(file)
--- a/
block/bsg.c
+++ b/
block/bsg.c
@@
-655,6
+655,9
@@
bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
dprintk("%s: write %Zd bytes\n", bd->name, count);
+ if (unlikely(segment_eq(get_fs(), KERNEL_DS)))
+ return -EINVAL;
+
bsg_set_block(bd, file);
bytes_written = 0;