lkml.org 
[lkml]   [2016]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v12 net-next 1/1] hv_sock: introduce Hyper-V Sockets
From
From: Dexuan Cui <decui@microsoft.com>
Date: Fri, 24 Jun 2016 07:45:24 +0000

> + while ((ret = vmalloc(size)) == NULL)
> + ssleep(1);

This is completely, and entirely, unacceptable.

If the allocation fails, you return an error and release
your resources.

You don't just loop forever waiting for it to succeed.

\
 
 \ /
  Last update: 2016-06-28 12:01    [W:1.551 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site