From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ve1eur01on0092.outbound.protection.outlook.com ([104.47.1.92]:16373 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752724AbeFHQCo (ORCPT ); Fri, 8 Jun 2018 12:02:44 -0400 Date: Fri, 8 Jun 2018 19:02:35 +0300 From: Cyrill Gorcunov To: Konstantin Khorenko Cc: Andrey Vagin , Benjamin Coddington , Jeff Layton , "J. Bruce Fields" , Alexander Viro , Vasily Averin , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] fs/lock: show locks info owned by dead/invisible processes Message-ID: <20180608160235.GA2581@uranus> References: <20180608142712.32460-1-khorenko@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180608142712.32460-1-khorenko@virtuozzo.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jun 08, 2018 at 05:27:10PM +0300, Konstantin Khorenko wrote: > The behavior has been changed after 9d5b86ac13c5 ("fs/locks: Remove fl_nspid > and use fs-specific l_pid for remote locks") > and now /proc/$PID/fdinfo/$FD does not show the info about the lock > * if the flock owner process is dead and its pid has been already freed > or > * if the lock owner is not visible in current pidns. > > CRIU uses this interface to store locks info during dump and thus can break > on v4.13 and newer. Indeed, it should cause problems with procfs parsing. We should add a test for such scenarions, and since we're running tests by linux-next all the time we would have this issue catched already. The series looks ok to me, but I'm not flock expert so better wait for more trustworthy opinion. > > So let's show info about locks anyway in described cases (like it was before > 9d5b86ac13c5), but show pid number saved in file_lock struct if we are in > init_pid_ns (patch 1) or just zero otherwise (patch 2) like we do with SID.