Skip to content

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

@stefanklug

Description

@stefanklug

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions