check which compares the number of required pages to
ps->dev->bus->sg_tablesize.
It seems to me that the check is per call, so using
multiple calls one could still pin unlimited amounts
of memory.
usbfs keeps track of the total amount of pinned memory and enforces an
overall limit. It will be necessary to add the size of the transfer
buffer to that total.
Leaving the zerocopy transfers out of this limit was intentional. I
thought this is user-memory so we shouldn't add it to the overall limit
as it is not allocated by usbfs.
But I didn't think of the pinning problem. So yes, I can add it to the
overall limit.
From: http://article.gmane.org/gmane.linux.usb.general/110775
Leaving the zerocopy transfers out of this limit was intentional. I thought this is user-memory so we shouldn't add it to the overall limit as it is not allocated by usbfs. But I didn't think of the pinning problem. So yes, I can add it to the overall limit.