Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the user-space memory to the usbfs emory tracker #2

Open
stefanklug opened this issue Oct 22, 2015 · 0 comments
Open

Add the user-space memory to the usbfs emory tracker #2

stefanklug opened this issue Oct 22, 2015 · 0 comments

Comments

@stefanklug
Copy link

From: http://article.gmane.org/gmane.linux.usb.general/110775

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant