Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1811464imm; Mon, 3 Sep 2018 10:03:28 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaLKjXkmBB6yceTMUfJ87p1/yglxfHO34uSN9Eb2wWytngeCWIF/Bz3ZFB+LhXvPHidMbIr X-Received: by 2002:a17:902:42e2:: with SMTP id h89-v6mr28800739pld.69.1535994208803; Mon, 03 Sep 2018 10:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535994208; cv=none; d=google.com; s=arc-20160816; b=z6nSSj3CCtWOY/mszzjvKHUYutSIo25yKxoH8GVi58EmgbC2zrbpPJc//BGb/rO6Gt 797G5XpQLBKJEDRQCetW0QoK9mtMdgMufMnxnfARy+uhgcll2Z+bUZYmR/+IC5HOr5jA toft4NWKNmCUFU+EhH+dXXdgghxQvpFOEG7yJ2zSPnKyUPKi0P7tv6CUjUY0kdDDvPQB r25d5E4hRDpS/fN3mIUxRex95JTxx2gGrDsx6XyD9AQu2uD/rqY+8TyttZUJ+TqxklDs mZMr2R6nz9mVRBMh40bDvTBkcm1T4l7OkbVFGXilOgLpiE4t4/SwlUV2Lmnx8uHLYpG3 vQWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=5Vpz6hR8cHJdnxFA6tGbyyKagUonRk7699AWuuv4BdQ=; b=SHgfY8NILBSruf8hUbQTHtkD6wZaiz2dqrkN765lUnHrzQH+sRI0mRDqYyiVC+HscH gYqWrB4n8f09dElQPc0Aonf8NsgQi8PeSlkKKfJuf7UylR2qpb8L7BggQBfeyc7giAuP DHbTKSfvY1fFDmhF1oZ2Ysj7Wwzcfy/s93/GNDmfdh1D8awrhmCNjRYEQSk76Qvzvgyq T45uRcDHsxWRluA5S2oqmwognhppnzR3nFQY3mjQybV8/KEtSG3ZyOao++GXzvMi35/M +nJ8kJgqiz927StD6J8dXjppra75MZlJ5WEx4C4dNnZr9iCRCKA0Mu4tBr6K6TrnHAbc wv5g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8-v6si20601760plm.117.2018.09.03.10.03.13; Mon, 03 Sep 2018 10:03:28 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728796AbeICVWp (ORCPT + 99 others); Mon, 3 Sep 2018 17:22:45 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38750 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727875AbeICVWo (ORCPT ); Mon, 3 Sep 2018 17:22:44 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C7997CFC; Mon, 3 Sep 2018 17:01:44 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kiran Kumar Modukuri , David Howells , Sasha Levin Subject: [PATCH 4.4 29/80] cachefiles: Wait rather than BUGing on "Unexpected object collision" Date: Mon, 3 Sep 2018 18:49:07 +0200 Message-Id: <20180903164935.314224031@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903164934.171677301@linuxfoundation.org> References: <20180903164934.171677301@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kiran Kumar Modukuri [ Upstream commit c2412ac45a8f8f1cd582723c1a139608694d410d ] If we meet a conflicting object that is marked FSCACHE_OBJECT_IS_LIVE in the active object tree, we have been emitting a BUG after logging information about it and the new object. Instead, we should wait for the CACHEFILES_OBJECT_ACTIVE flag to be cleared on the old object (or return an error). The ACTIVE flag should be cleared after it has been removed from the active object tree. A timeout of 60s is used in the wait, so we shouldn't be able to get stuck there. Fixes: 9ae326a69004 ("CacheFiles: A cache that backs onto a mounted filesystem") Signed-off-by: Kiran Kumar Modukuri Signed-off-by: David Howells Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/cachefiles/namei.c | 1 - 1 file changed, 1 deletion(-) --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -194,7 +194,6 @@ wait_for_old_object: pr_err("\n"); pr_err("Error: Unexpected object collision\n"); cachefiles_printk_object(object, xobject); - BUG(); } atomic_inc(&xobject->usage); write_unlock(&cache->active_lock);