Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3654799imm; Mon, 30 Jul 2018 00:42:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeIh2aPAIrQo/EKE5/f4cwX7ns4TFObWmOfjyUGhwHeH5p1BZxFfyEj3oxzdeJO9htUsTuw X-Received: by 2002:a63:f919:: with SMTP id h25-v6mr14974071pgi.401.1532936563784; Mon, 30 Jul 2018 00:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532936563; cv=none; d=google.com; s=arc-20160816; b=j3+kEqJk1xZFQ44W24hS7laADSDKkQubrkGybdzQnf8dwMy530ntN7Z8W6GDj4P+Qg q73rANRC/1D48WbUCdoaVE0F37NB8Xv875hEhpUduFOsA+RhGk5jKoL+ZYZtvg+NVjpd YkOsOWxZrZ4RO++6qfpMa8C1JThk2bTX+/QHwDug1O9C4F8C0gyo1XyCgbTfqHLRIyRN rx4O2lOW+3IbGae0iw/x8RyOF//PH/FB43I/shFZXI6yZlPirp6PLQU4ntllGEm5q6pc m8CzOTqHgkAFFsHUlWXHy93iLv/mCEVgSTdKkTcIPSnd3XUW8NR9GXScAiPn4UWx837U SAhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=xBfL030f1ZHgv6lLCYn+TM4Y8fxklaDJt/kIBRqWk9c=; b=kbXaRg8n0gycsJZcdcKEjllsc/FDGLcScqUW22kAkpbLKJDhPSpSf7aO0KOfEoSSXP PiQZq1xw4DSQoDpUew3aRWJKA3IPhzSTSN/hbo+y5sxio1NADhWs2r8QZIns5qEGlhnb tvay8zOh7ZGlVkwnZdkqevWAkAS01njsqAFZF0AISzmPiiIpyX1ni4d8rVrvvVJNaqYo slw8zb+58vduMyveSqXy20RF9j9A16XSROjDhEFwtXKdsYkzBkZ4TTDwlYnHfWwG8TWw cvOTSEI/iCRbTAW+blsB0c+znYaC9rwiZpYCoRF+Q43BiG5LYzAMdPNwJYZ9Wf7+lplA 3H/A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9-v6si9288002pfe.11.2018.07.30.00.42.29; Mon, 30 Jul 2018 00:42:43 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726670AbeG3JPP (ORCPT + 99 others); Mon, 30 Jul 2018 05:15:15 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:46899 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbeG3JPP (ORCPT ); Mon, 30 Jul 2018 05:15:15 -0400 Received: by mail-oi0-f67.google.com with SMTP id y207-v6so19511999oie.13 for ; Mon, 30 Jul 2018 00:41:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xBfL030f1ZHgv6lLCYn+TM4Y8fxklaDJt/kIBRqWk9c=; b=nzvg8Zg+rtTXaO8C0PyF+LTk195nj1El+Xer7R0z3gHg8Quu85DxU4n35FBiGTaq6M BLRSY9TuSjpG4bebyd3wcZ8PzHiudprhVElzHal6tg9RCn1DSqohQ4QdxkZN5uV0yEKs n1C0CcE9+ekAx/m8Pw0VYIr9xT42GtGEciKNoaSBYxNLu1rJhiJd8i5kuOgTJ/5xrZqY oc3K1gJVKxblNA1XOOTnlc7zApFVo9KEwHLLsqyyO4HKRnWBNL+OoBA040Gkdi9C1eiX zhXvj2c4RtCtmCtMLICKmcfXOcbFaOGO7HNh0OcBwFodtM9OCxKfuXkEbNavyiB0OOmS ea0Q== X-Gm-Message-State: AOUpUlHPLHR6iRwV4GHhYdOeKCesaKRnhAz1aRwaZRdpFJ3n9HrpFouE KUAQd3XXSdNMClne/leDd3qWiCZEwmxICMzXOqGcLQ== X-Received: by 2002:aca:5004:: with SMTP id e4-v6mr17936769oib.111.1532936494641; Mon, 30 Jul 2018 00:41:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:3407:0:0:0:0:0 with HTTP; Mon, 30 Jul 2018 00:41:33 -0700 (PDT) In-Reply-To: References: <20180729220317.GB30522@ZenIV.linux.org.uk> <20180729220453.13431-1-viro@ZenIV.linux.org.uk> <20180729220453.13431-3-viro@ZenIV.linux.org.uk> From: Miklos Szeredi Date: Mon, 30 Jul 2018 09:41:33 +0200 Message-ID: Subject: Re: [PATCH 03/16] vfs: don't evict uninitialized inode To: Amir Goldstein Cc: Al Viro , linux-fsdevel , Linus Torvalds , linux-kernel , Greg KH Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 30, 2018 at 7:09 AM, Amir Goldstein wrote: > On Mon, Jul 30, 2018 at 1:04 AM, Al Viro wrote: >> From: Miklos Szeredi >> >> iput() ends up calling ->evict() on new inode, which is not yet initialized >> by owning fs. So use destroy_inode() instead. >> >> Add to sb->s_inodes list only if inode is not in I_CREATING state (meaning >> that it wasn't allocated with new_inode(), which already does the >> insertion). >> >> Reported-by: Al Viro >> Signed-off-by: Miklos Szeredi >> Fixes: 80ea09a002bf ("vfs: factor out inode_insert5()") > > Backport hint: this patch depends on the patch ("new primitive: > discard_new_inode()") currently commit 22dc9a168272 in Al's for-next. > > Still trying to figure out the best format to channel this information to > stable maintainers... Why are we talking about stable? This regression was introduced in 4.18-rc1, spotted by Al *and* reported by testers. It needs to be fixed in one way or other in 4.18. I've nothing against applying "new primitive: discard_new_inode() now + this patch, but if it is deemed too risky at this point, we could just revert the buggy commit 80ea09a002bf ("vfs: factor out inode_insert5()") and its dependencies. Thanks, Miklos