Message ID | 20241125104011.36552-9-cgoettsche@seltendoof.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [01/11] coccinelle: Add script to reorder capable() calls | expand |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 6841e61a6bd0..8bf622744862 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -1656,7 +1656,7 @@ int mm_account_pinned_pages(struct mmpin *mmp, size_t size) unsigned long max_pg, num_pg, new_pg, old_pg, rlim; struct user_struct *user; - if (capable(CAP_IPC_LOCK) || !size) + if (!size || capable(CAP_IPC_LOCK)) return 0; rlim = rlimit(RLIMIT_MEMLOCK);