Thread (6 messages) 6 messages, 2 authors, 2017-10-16

Re: [PATCH] pmd_virtio: Unchecked return value from library

From: Tan, Jianfeng <hidden>
Date: 2017-10-16 14:51:38

Hi Sebastian,

Sorry for the late response. I missed the previous emails.

On 10/16/2017 4:32 PM, Basierski, SebastianX wrote:
quoted
  			flags = fcntl(dev->vhostfd, F_GETFL);
-			fcntl(dev->vhostfd, F_SETFL, flags | O_NONBLOCK);
+			if (fcntl(dev->vhostfd, F_SETFL,
+					flags | O_NONBLOCK) == -1)
+				return;
Actually, even it fails, I still prefer to continue instead of "return" here. Maybe, we can report an error message here.

Thanks,
Jianfeng



Hi Jianfeng,

I'like to continue with the task.
So please let me know if You are certain with Your option:
continue instead of return (and add error report), despite possibility of returning error from fcntl.
Even "return" directly, please add an error message here so that users 
can notice such error.

Besides, the subject can be changed to:
   "net/virtio: fix unchecked return value"

Thanks,
Jianfeng
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help