Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1823455imm; Mon, 3 Sep 2018 10:21:35 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda4sBPPJQHXn38x5IrYp/dCIUAgUzDwhVkFzVpouMODAXHePQgx8hfUB10wXfmDgdBfQfrr X-Received: by 2002:a62:2a48:: with SMTP id q69-v6mr30375808pfq.86.1535995295853; Mon, 03 Sep 2018 10:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995295; cv=none; d=google.com; s=arc-20160816; b=WVbX9A8zSI32nqsKKSPbplXFUsf49CufFfy6BpFLUsblfsn3yNPVugDZUtaO2M6my2 j58VthR24tuA9nbNlgmiD1kdbV/D6KYMgWhJN2oQ/p0XNUStddRTalzj5ORR8mhd+AZ3 N1Rr/N8RJtPFt8n2m0GTxEQ0LNjYvVnVXpViw2lyEh4JDtPsgB7S9MdiLY4TJVN9AqcI EnK1muZpSqfaQPrKbRDFu0Eiy387VoU5Tx2ZPmCmJ2AJEIaKP9KzEr4dVq43K/v41AT0 AsGk8krmVxnZVz6pXBN1oJT4nFKuiIJuEUOUPGNttwaZAIphu5qqWCZJGISQPpBVstQU T1tQ== 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=rloWi6ke8duBW+Csw0mQdORVPQcfrJ/DFLWV0tEhxqM=; b=P104Wth4h+sZP+NWK/tYgE5tPl6Lh2EC8VL2Kd8F1vy5Nx5OO5tOcBOVoR0h6v/Cpc aq7S+AjTnW0sj6zOYEPzsQBxljnzKwbWWddBfki1NQcj6/iwQk46kmNvndl5Q4mui2i8 wZ2UZqA8PZXugAGIqfY6enXeA7sFVtf1y8O3mYh0/ImnIsc0X3YMZiiG+OSRIXpeOgTd U+MMErXNXlooc0Fn00lCQy6CQx6eGWZFUPfhtjWvXZh6o6w4JukEKODnhAJOxJCd5QdX UsBIVow0DjuO3bnlifZSuiPAYMzshfS0XeEznDB8uAZY9ACfbSTlrfn5HQ1hYIqPUAE1 vCeQ== 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 l64-v6si4483270pgl.145.2018.09.03.10.21.20; Mon, 03 Sep 2018 10:21:35 -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 S1730265AbeICVjE (ORCPT + 99 others); Mon, 3 Sep 2018 17:39:04 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42950 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728154AbeICVjD (ORCPT ); Mon, 3 Sep 2018 17:39:03 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D5AB0D09; Mon, 3 Sep 2018 17:17:58 +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.14 053/165] cachefiles: Wait rather than BUGing on "Unexpected object collision" Date: Mon, 3 Sep 2018 18:55:39 +0200 Message-Id: <20180903165657.799460410@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@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.14-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 @@ -195,7 +195,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);