From patchwork Tue Sep 6 12:47:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 666532 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3sT5wl07D5z9s9c; Tue, 6 Sep 2016 22:47:51 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical-com.20150623.gappssmtp.com header.i=@canonical-com.20150623.gappssmtp.com header.b=AgyXuVvD; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1bhFn2-0006M2-4M; Tue, 06 Sep 2016 12:47:48 +0000 Received: from mail-wm0-f50.google.com ([74.125.82.50]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1bhFms-0006J5-Av for kernel-team@lists.ubuntu.com; Tue, 06 Sep 2016 12:47:38 +0000 Received: by mail-wm0-f50.google.com with SMTP id i204so32569930wma.0 for ; Tue, 06 Sep 2016 05:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UKD9SNoxjhvf8oCnY8XTVr2GfKP3Mw5MSLj9THYtYMc=; b=AgyXuVvDuK6yyuhMgE8hAT4tfUWjDMbKAtxLoeN5OV6BDhSU4hA2C5bBL2XP4tPup0 SwTV2mm2hTYEx+31ERi8dVQ404eMem8cYGAerjPBqp2/JMZ5Vjr3hBOytwn4qRXkB4pz N5r76PBoxy2QWvLhttnYrFeAUKoWRW1z+ASuIz47LFkBTsrhsyILV/Az/C1OZPd6ZFNl EKmTsGj3Y7qgVgdA1G7xs2iPnpYX2XBQCNs3GKR0YIwNv34uocudsH9BSm/W5086Osqx hsjjTY8vbLJAbEoKgpQHYDnu9+0w9e+SkDzu0+zQ1FFmbMAhxh93nu3L6EbcmVrfIBcz nk+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UKD9SNoxjhvf8oCnY8XTVr2GfKP3Mw5MSLj9THYtYMc=; b=jeTAxWP1OVEcvMj1v0CS6x/C6m5RWCO17Ws8l4LxvtjO1NiEG5JKNYlwIeYEJ1vN80 AEIWJqZjMoZ82HEFfTQ6DDppwv7OtUxlUiROJeLr/iL171ha1XA9znLNrKPUBM4d81S+ I4G6ONxAxAyMkwo/pzNrWBliPOzRCFBZL4BlEy0GCFTutPh08h+CZuHPDWhC34dIB1ga +S1g1CiwLhCeW2my9YLp28C0OgVHT+d1VJO7jbnysDNGbhSNPOHUYYsF73fArBXgoQG/ CvK99/nZ1qpgRiyv1zf2xGEj2lAbKgLK82ptynk/R4kPVnRyJtpDE5llXOf2EJhH43tp FbQA== X-Gm-Message-State: AE9vXwNlkYzQnVDY3GxbU88buP1YybWgSRJzKzJQVOwuQFjKt5yYqRwmpdOZhUr9XqsOSUZ1 X-Received: by 10.28.22.70 with SMTP id 67mr20787691wmw.52.1473166057837; Tue, 06 Sep 2016 05:47:37 -0700 (PDT) Received: from localhost ([2001:470:6973:2:8115:f7f3:1df7:5f68]) by smtp.gmail.com with ESMTPSA id i80sm26368602wmf.11.2016.09.06.05.47.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Sep 2016 05:47:37 -0700 (PDT) From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [xenial/master-next 1/1] UBUNTU: SAUCE: overlayfs: fix regression in whiteout detection Date: Tue, 6 Sep 2016 13:47:34 +0100 Message-Id: <20160906124734.26836-2-apw@canonical.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160906124734.26836-1-apw@canonical.com> References: <20160906124734.26836-1-apw@canonical.com> Cc: Andy Whitcroft X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com The Ubuntu backport of the below commit necessarily had to follow the changes to is_ovl_whiteout. In the process the wrong dentry was passed preventing correct detection of legacy whitouts in a rename over a whitout on some upper filesystem types (at least ramfs): commit 11f3710417d026ea2f4fcf362d866342c5274185 Author: Miklos Szeredi Date: Mon Mar 21 17:31:44 2016 +0100 ovl: verify upper dentry before unlink and rename Pass the correct dentry to allow detection of the appropriate whiteout types. Fixes: 11f3710417d0 ("ovl: verify upper dentry before unlink and rename") in Ubuntu BugLink: http://bugs.launchpad.net/bugs/1618572 Signed-off-by: Andy Whitcroft --- fs/overlayfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index f85f51f..01b6b8a 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -919,7 +919,7 @@ static int ovl_rename2(struct inode *olddir, struct dentry *old, } else { new_create = true; if (!d_is_negative(newdentry) && - (!new_opaque || !ovl_is_whiteout(newdentry,ovl_config_legacy(newdentry)))) + (!new_opaque || !ovl_is_whiteout(newdentry,ovl_config_legacy(new)))) goto out_dput; }