Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3345484imm; Mon, 4 Jun 2018 01:51:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ4jqia8pgsbNEyQnShPtFecRb8l8gmln8zieI9EtauAXIaJ2WLmSu8YB3pGpvuq0MFmLPc X-Received: by 2002:a63:b91b:: with SMTP id z27-v6mr16450598pge.240.1528102301170; Mon, 04 Jun 2018 01:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528102301; cv=none; d=google.com; s=arc-20160816; b=p7GKkKJt4i4xrJ3Ium6ICRMTpruFl4djpv7GHPgltTBautjoai9iL6dOTaCy30oW3w g/bZs1DRZwH1OyEEz4Ww/EgRXMVzmT/AAKU+LrgFf0Lw+o6/cGe4YGoZNOdjg25Nc6lG 7IxZMxIDJNeNr5qVlbyyQQgPlbJLi8i4RTo6qTfvV8U5V3OPLRotR5dKhfb9skbEyhS1 fEEwXCPjK7RTfDVHebtPvagibtVBnIPwZsdZR4bp//7VC3hUexvi+lYkqACUgdbavM4h Rlh+wGQ1NWKFCyQqP06y+nQyd2YKlkC/vH3bxxwK9FoOyN2+ze0SclENQd6Km1lzY1im 7j+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=1Gsd8QhtKUqBPpzgsonK9ckFwrry7OCgMeBqQ8qq28I=; b=Qo3KPbS3B70cO7wkb+s9IeEnNfHMGPiGEYLobQPP091A9I+Kvtluy0NSix59mPLvQ6 c+D468EYWZBFJ57Nug/5DYwTAgngeyedFS5PHFBLCiBBlGzv2KJERNzhrRk47R29turc tYyghlWXqms9kDq48BeVypWkU7n1C8Scs97Xs27p5VKhIXtykBICOVE4MEm9NL99XaeK MFf+F+LY8keEby8Q7zUPFPA7UiEMfBUKGSHzZQP+dh3GAeZUcR70lNMZ6BPzUDZvUGl0 0UxY4e30c+FJruXQ13H/pTdxzEY0KgveXcv80dIAoBKPR0FMXLqWjwEFkHFHSdTZiJ7F ADjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Jjvo7Le6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t186-v6si2200620pgd.41.2018.06.04.01.51.26; Mon, 04 Jun 2018 01:51:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Jjvo7Le6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbeFDIuJ (ORCPT + 99 others); Mon, 4 Jun 2018 04:50:09 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34222 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750866AbeFDIuG (ORCPT ); Mon, 4 Jun 2018 04:50:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1Gsd8QhtKUqBPpzgsonK9ckFwrry7OCgMeBqQ8qq28I=; b=Jjvo7Le6i26EW2GF5ktbX6S5u +uT8ofdyhY4RMrXYCM1Yj/LhBr0laIE1wNmhaSMEHw2fuH63UJmrlSBvx/QWxHQ2CxrjV+O+m2lum Xac6NYp3pkdSKyS7Lj9cgXxzuNhNqzUjFtdFUG3fMOSqHFonNnfvHfRfFCq37rUAXtUlAh4sZ8yMD P+wQcfARWjDzJN2w7sViwK+KUDL9sFqUPkDgbSalHznmEGgzBWwPNSZKc1soLLILAY2g/oBcQwntV o6CQLIPxCNHD97X+gBS1eSyMQD0JM4EK6k75lc3HNZrMxwaxnsldY4MusKlWdqg2XGrWYnQzB0shh /oEkV+PJQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fPlBl-0007mD-Bh; Mon, 04 Jun 2018 08:50:05 +0000 Date: Mon, 4 Jun 2018 01:50:05 -0700 From: Christoph Hellwig To: Miklos Szeredi Cc: linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 32/39] vfs: fix freeze protection in mnt_want_write_file() for overlayfs Message-ID: <20180604085005.GG11333@infradead.org> References: <20180529144339.16538-1-mszeredi@redhat.com> <20180529144339.16538-33-mszeredi@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180529144339.16538-33-mszeredi@redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 29, 2018 at 04:43:32PM +0200, Miklos Szeredi wrote: > The underlying real file used by overlayfs still contains the overlay path. > This results in mnt_want_write_file() calls by the filesystem getting > freeze protection on the wrong inode (the overlayfs one instead of the real > one). > > Fix by using file_inode(file)->i_sb instead of file->f_path.mnt->mnt_sb. Looks fine: Reviewed-by: Christoph Hellwig