aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/sock.c')
-rw-r--r--net/core/sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index b2e14c07d920..c7e60eac639b 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1534,7 +1534,7 @@ struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force,
1534 */ 1534 */
1535void *sock_kmalloc(struct sock *sk, int size, gfp_t priority) 1535void *sock_kmalloc(struct sock *sk, int size, gfp_t priority)
1536{ 1536{
1537 if ((unsigned)size <= sysctl_optmem_max && 1537 if ((unsigned int)size <= sysctl_optmem_max &&
1538 atomic_read(&sk->sk_omem_alloc) + size < sysctl_optmem_max) { 1538 atomic_read(&sk->sk_omem_alloc) + size < sysctl_optmem_max) {
1539 void *mem; 1539 void *mem;
1540 /* First do the add, to avoid the race if kmalloc 1540 /* First do the add, to avoid the race if kmalloc