qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] net: Remove dead code from net/socket.c


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH] net: Remove dead code from net/socket.c
Date: Mon, 17 May 2010 09:23:56 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Miguel Di Ciurcio Filho wrote:
> On Fri, May 14, 2010 at 2:03 PM, Jan Kiszka <address@hidden> wrote:
>>> In both cases the info_str string is written inside
>>> net_socket_fd_init_(stream|dgram), and after that, it is
>>> overwritten on a subsequent snprintf() in net_socket_accept().
>>>
>> There is non-zero time window between registration and acceptance. And
>> you have the path taken for fd sockets.
>>
> 
> It is non-zero, yes, but what is the point of writing to info_str with
> an fd number for less them 5ms, when that value will be overwritten
> anyway?

You are right regarding listen sockets, I forgot that they block, thus
there is no chance to request any information about them before the link
has been established.

But my point about the sockets created by file descriptor remains valid.

> 
> I'm an student, just trying to understand what is going on :-D

Always welcome! People who look from a different angle at this can often
find cruft that others already stopped to realize.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux



reply via email to

[Prev in Thread] Current Thread [Next in Thread]