aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-debug.h
diff options
context:
space:
mode:
authorWillem de Bruijn <[email protected]>2023-02-14 10:57:40 -0500
committerJakub Kicinski <[email protected]>2023-02-15 21:26:36 -0800
commit14ade6ba4120fb38fcb5033998882c5b3d591194 (patch)
treea1e1c6ca6657492cad217a349b73a10556bef625 /drivers/usb/cdns3/cdns3-debug.h
parentc24a34f5a3d7dec595635ad54167a8c471e4e24f (diff)
net: msg_zerocopy: elide page accounting if RLIM_INFINITY
MSG_ZEROCOPY ensures that pinned user pages do not exceed the limit. If no limit is set, skip this accounting as otherwise expensive atomic_long operations are called for no reason. This accounting is already skipped for privileged (CAP_IPC_LOCK) users. Rely on the same mechanism: if no mmp->user is set, mm_unaccount_pinned_pages does not decrement either. Tested by running tools/testing/selftests/net/msg_zerocopy.sh with an unprivileged user for the TXMODE binary: ip netns exec "${NS1}" sudo -u "{$USER}" "${BIN}" "-${IP}" ... Signed-off-by: Willem de Bruijn <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions