[CRIU] Re: [PATCH] sockets: Fix file-bound socket check for dgram sockets

Pavel Emelyanov xemul at parallels.com
Wed Feb 8 06:09:16 EST 2012


On 02/08/2012 03:07 PM, Pavel Emelyanov wrote:
> On 02/08/2012 03:03 PM, Cyrill Gorcunov wrote:
>> On Wed, Feb 08, 2012 at 02:52:19PM +0400, Cyrill Gorcunov wrote:
>>> DGRAM sockets do not care about mount point of
>>> file-bound sockets and at time of connect() kernel
>>> do not update this information once socket is cretaed,
>>> thus do not eliminate dumping of suck sockets name
>>> if at least inode match.
>>>
>>
>> Sorry for such silly changelog. In short -- when connect is
>> called on stream socket, the kernel updates dentry of sockets
>> so that both ino and st_dev match, but in case of dgrams, they
>> are not updated and then we will not dump socket name and at
>> restore time there will be no way to resolve a name of a socket
>> to call connect on (ie sockets00 test-case fails)
> 
> Это неверный патч. Надо так:
> 
> if (sk->type == SOCK_STREAM && (ino != vfs_ino || dev != vfs_dev)
> 	/* drop bound name */

Нет, стоп, все назад. Ты не прав, Кирил. По ядру пути connect-а
не отличаются -- там делается тупой path_walk.

>> 	Cyrill
>>
> 




More information about the CRIU mailing list