Page MenuHomeFreeBSD

linuxkpi: Correct nents passed to dma_{un,}map_sg_attrs
ClosedPublic

Authored by zishun.yi.dev_gmail.com on Jun 25 2026, 1:28 PM.
Referenced Files
Unknown Object (File)
Sat, Oct 3, 11:40 PM
Unknown Object (File)
Sat, Oct 3, 1:25 AM
Unknown Object (File)
Fri, Oct 2, 11:23 PM
Unknown Object (File)
Thu, Oct 1, 10:57 AM
Unknown Object (File)
Tue, Sep 29, 9:45 AM
Unknown Object (File)
Sun, Sep 20, 12:17 PM
Unknown Object (File)
Sun, Sep 20, 10:51 AM
Unknown Object (File)
Sat, Sep 19, 3:55 PM

Details

Summary

In linux docs, there is:

void
dma_unmap_sg(struct device *dev, struct scatterlist *sg,
             int nents, enum dma_data_direction direction)
Note: <nents> must be the number you passed in, not the number of DMA
address entries returned.

but I think currently nents is equal to orig_nents in linuxkpi. So It's
just a trivial fix.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz added a subscriber: bz.

I believe this is a NOP but more correct.

This revision is now accepted and ready to land.Aug 22 2026, 10:30 PM