projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'v3.10.107' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
block
/
bsg.c
diff --git
a/block/bsg.c
b/block/bsg.c
index 420a5a9f1b23f72963dc928b2dd009be443e3337..76801e57f556d8c3cc055842ba26516b6e944dd0 100644
(file)
--- a/
block/bsg.c
+++ b/
block/bsg.c
@@
-675,6
+675,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;