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

Merge tag 'block-6.12-20241004' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

- Fix another use-after-free in aoe

- Fixup wrong nested non-saving irq disable/restore in blk-iocost

- Fixup a kerneldoc complaint introduced by a merge window patch

* tag 'block-6.12-20241004' of git://git.kernel.dk/linux:
aoe: fix the potential use-after-free problem in more places
blk_iocost: remove some duplicate irq disable/enables
block: fix blk_rq_map_integrity_sg kernel-doc

+17 -7
+1 -2
block/blk-integrity.c
··· 56 56 57 57 /** 58 58 * blk_rq_map_integrity_sg - Map integrity metadata into a scatterlist 59 - * @q: request queue 60 - * @bio: bio with integrity metadata attached 59 + * @rq: request to map 61 60 * @sglist: target scatterlist 62 61 * 63 62 * Description: Map the integrity vectors in request into a
+4 -4
block/blk-iocost.c
··· 3166 3166 if (!dname) 3167 3167 return 0; 3168 3168 3169 - spin_lock_irq(&ioc->lock); 3169 + spin_lock(&ioc->lock); 3170 3170 seq_printf(sf, "%s enable=%d ctrl=%s rpct=%u.%02u rlat=%u wpct=%u.%02u wlat=%u min=%u.%02u max=%u.%02u\n", 3171 3171 dname, ioc->enabled, ioc->user_qos_params ? "user" : "auto", 3172 3172 ioc->params.qos[QOS_RPPM] / 10000, ··· 3179 3179 ioc->params.qos[QOS_MIN] % 10000 / 100, 3180 3180 ioc->params.qos[QOS_MAX] / 10000, 3181 3181 ioc->params.qos[QOS_MAX] % 10000 / 100); 3182 - spin_unlock_irq(&ioc->lock); 3182 + spin_unlock(&ioc->lock); 3183 3183 return 0; 3184 3184 } 3185 3185 ··· 3366 3366 if (!dname) 3367 3367 return 0; 3368 3368 3369 - spin_lock_irq(&ioc->lock); 3369 + spin_lock(&ioc->lock); 3370 3370 seq_printf(sf, "%s ctrl=%s model=linear " 3371 3371 "rbps=%llu rseqiops=%llu rrandiops=%llu " 3372 3372 "wbps=%llu wseqiops=%llu wrandiops=%llu\n", 3373 3373 dname, ioc->user_cost_model ? "user" : "auto", 3374 3374 u[I_LCOEF_RBPS], u[I_LCOEF_RSEQIOPS], u[I_LCOEF_RRANDIOPS], 3375 3375 u[I_LCOEF_WBPS], u[I_LCOEF_WSEQIOPS], u[I_LCOEF_WRANDIOPS]); 3376 - spin_unlock_irq(&ioc->lock); 3376 + spin_unlock(&ioc->lock); 3377 3377 return 0; 3378 3378 } 3379 3379
+12 -1
drivers/block/aoe/aoecmd.c
··· 361 361 } 362 362 363 363 ah->cmdstat = ATA_CMD_PIO_READ | writebit | extbit; 364 + dev_hold(t->ifp->nd); 364 365 skb->dev = t->ifp->nd; 365 366 } 366 367 ··· 402 401 __skb_queue_head_init(&queue); 403 402 __skb_queue_tail(&queue, skb); 404 403 aoenet_xmit(&queue); 404 + } else { 405 + dev_put(f->t->ifp->nd); 405 406 } 406 407 return 1; 407 408 } ··· 486 483 memcpy(h->dst, t->addr, sizeof h->dst); 487 484 memcpy(h->src, t->ifp->nd->dev_addr, sizeof h->src); 488 485 486 + dev_hold(t->ifp->nd); 489 487 skb->dev = t->ifp->nd; 490 488 skb = skb_clone(skb, GFP_ATOMIC); 491 - if (skb == NULL) 489 + if (skb == NULL) { 490 + dev_put(t->ifp->nd); 492 491 return; 492 + } 493 493 f->sent = ktime_get(); 494 494 __skb_queue_head_init(&queue); 495 495 __skb_queue_tail(&queue, skb); ··· 623 617 __skb_queue_head_init(&queue); 624 618 __skb_queue_tail(&queue, skb); 625 619 aoenet_xmit(&queue); 620 + } else { 621 + dev_put(f->t->ifp->nd); 626 622 } 627 623 } 628 624 ··· 1403 1395 ah->cmdstat = ATA_CMD_ID_ATA; 1404 1396 ah->lba3 = 0xa0; 1405 1397 1398 + dev_hold(t->ifp->nd); 1406 1399 skb->dev = t->ifp->nd; 1407 1400 1408 1401 d->rttavg = RTTAVG_INIT; ··· 1413 1404 skb = skb_clone(skb, GFP_ATOMIC); 1414 1405 if (skb) 1415 1406 f->sent = ktime_get(); 1407 + else 1408 + dev_put(t->ifp->nd); 1416 1409 1417 1410 return skb; 1418 1411 }