Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'block-6.16-20250619' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

- Two fixes for aoe which fixes issues dating back to when this driver
was converted to blk-mq

- Fix for ublk, checking for valid queue depth and count values before
setting up a device

* tag 'block-6.16-20250619' of git://git.kernel.dk/linux:
ublk: santizize the arguments from userspace when adding a device
aoe: defer rexmit timer downdev work to workqueue
aoe: clean device rq_list in aoedev_downdev()

+22 -3
+1
drivers/block/aoe/aoe.h
··· 80 80 DEVFL_NEWSIZE = (1<<6), /* need to update dev size in block layer */ 81 81 DEVFL_FREEING = (1<<7), /* set when device is being cleaned up */ 82 82 DEVFL_FREED = (1<<8), /* device has been cleaned up */ 83 + DEVFL_DEAD = (1<<9), /* device has timed out of aoe_deadsecs */ 83 84 }; 84 85 85 86 enum {
+6 -2
drivers/block/aoe/aoecmd.c
··· 754 754 755 755 utgts = count_targets(d, NULL); 756 756 757 - if (d->flags & DEVFL_TKILL) { 757 + if (d->flags & (DEVFL_TKILL | DEVFL_DEAD)) { 758 758 spin_unlock_irqrestore(&d->lock, flags); 759 759 return; 760 760 } ··· 786 786 * to clean up. 787 787 */ 788 788 list_splice(&flist, &d->factive[0]); 789 - aoedev_downdev(d); 789 + d->flags |= DEVFL_DEAD; 790 + queue_work(aoe_wq, &d->work); 790 791 goto out; 791 792 } 792 793 ··· 898 897 aoecmd_sleepwork(struct work_struct *work) 899 898 { 900 899 struct aoedev *d = container_of(work, struct aoedev, work); 900 + 901 + if (d->flags & DEVFL_DEAD) 902 + aoedev_downdev(d); 901 903 902 904 if (d->flags & DEVFL_GDALLOC) 903 905 aoeblk_gdalloc(d);
+12 -1
drivers/block/aoe/aoedev.c
··· 198 198 { 199 199 struct aoetgt *t, **tt, **te; 200 200 struct list_head *head, *pos, *nx; 201 + struct request *rq, *rqnext; 201 202 int i; 203 + unsigned long flags; 202 204 203 - d->flags &= ~DEVFL_UP; 205 + spin_lock_irqsave(&d->lock, flags); 206 + d->flags &= ~(DEVFL_UP | DEVFL_DEAD); 207 + spin_unlock_irqrestore(&d->lock, flags); 204 208 205 209 /* clean out active and to-be-retransmitted buffers */ 206 210 for (i = 0; i < NFACTIVE; i++) { ··· 226 222 227 223 /* clean out the in-process request (if any) */ 228 224 aoe_failip(d); 225 + 226 + /* clean out any queued block requests */ 227 + list_for_each_entry_safe(rq, rqnext, &d->rq_list, queuelist) { 228 + list_del_init(&rq->queuelist); 229 + blk_mq_start_request(rq); 230 + blk_mq_end_request(rq, BLK_STS_IOERR); 231 + } 229 232 230 233 /* fast fail all pending I/O */ 231 234 if (d->blkq) {
+3
drivers/block/ublk_drv.c
··· 2825 2825 if (copy_from_user(&info, argp, sizeof(info))) 2826 2826 return -EFAULT; 2827 2827 2828 + if (info.queue_depth > UBLK_MAX_QUEUE_DEPTH || info.nr_hw_queues > UBLK_MAX_NR_QUEUES) 2829 + return -EINVAL; 2830 + 2828 2831 if (capable(CAP_SYS_ADMIN)) 2829 2832 info.flags &= ~UBLK_F_UNPRIVILEGED_DEV; 2830 2833 else if (!(info.flags & UBLK_F_UNPRIVILEGED_DEV))