]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - block/bsg.c
usb: quirks: add delay init quirk for Corsair Strafe RGB keyboard
[mirror_ubuntu-zesty-kernel.git] / block / bsg.c
index 8a05a404ae708503589bdf33643948c37d243e62..a57046de2f07f00eae78aaabe9b5e43c1ecc178f 100644 (file)
@@ -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;