Eideticom / eid-hermes

An open-source eBPF accelerator that can run on QEMU and AWS F1 instances
10 stars 2 forks source link

driver: fix sg_table nents #27

Closed iomartin closed 3 years ago

iomartin commented 3 years ago

After we converted xdma_channel_read_write to work with iov_iter (dc657952b146), the sg_table's orig_nents (the allocated size) can now be larger than the mapped size (nents).

This was partially fixed on 5bf1f0df0689, but a couple of references to orig_nents remained in the debug code (which was protected by #ifdef macros and hence not included).

Fixes: dc657952b146 ("driver: convert xdma_channel_read_write to work with iov_iter")