diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-mq.c | 2 | ||||
-rw-r--r-- | block/bsg.c | 3 | ||||
-rw-r--r-- | block/ioctl.c | 2 | ||||
-rw-r--r-- | block/partitions/ibm.c | 2 | ||||
-rw-r--r-- | block/scsi_ioctl.c | 2 |
5 files changed, 7 insertions, 4 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 4bf850e8d6b5..a8e67a155d04 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2569,7 +2569,7 @@ static bool blk_mq_poll_hybrid_sleep(struct request_queue *q, * This will be replaced with the stats tracking code, using * 'avg_completion_time / 2' as the pre-sleep target. */ - kt = ktime_set(0, nsecs); + kt = nsecs; mode = HRTIMER_MODE_REL; hrtimer_init_on_stack(&hs.timer, CLOCK_MONOTONIC, mode); diff --git a/block/bsg.c b/block/bsg.c index 8a05a404ae70..a57046de2f07 100644 --- 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; diff --git a/block/ioctl.c b/block/ioctl.c index 656c8c6ed206..be7f4de3eb3c 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -8,7 +8,7 @@ #include <linux/fs.h> #include <linux/blktrace_api.h> #include <linux/pr.h> -#include <asm/uaccess.h> +#include <linux/uaccess.h> static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user *arg) { diff --git a/block/partitions/ibm.c b/block/partitions/ibm.c index 47a61474e795..14b081af8d61 100644 --- a/block/partitions/ibm.c +++ b/block/partitions/ibm.c @@ -10,7 +10,7 @@ #include <linux/slab.h> #include <asm/dasd.h> #include <asm/ebcdic.h> -#include <asm/uaccess.h> +#include <linux/uaccess.h> #include <asm/vtoc.h> #include "check.h" diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index c6fee7437be4..c2b64923ab66 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -28,7 +28,7 @@ #include <linux/slab.h> #include <linux/times.h> #include <linux/uio.h> -#include <asm/uaccess.h> +#include <linux/uaccess.h> #include <scsi/scsi.h> #include <scsi/scsi_ioctl.h> |