Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1193810ybh; Thu, 16 Jul 2020 05:57:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu4gcsWuiJbLsj7OOxRGrUQNsWusazHApLacUjKBehd+pkXh2RVTsjC6/S0p+oUr1NAnKJ X-Received: by 2002:a17:906:3a04:: with SMTP id z4mr3460832eje.441.1594904271156; Thu, 16 Jul 2020 05:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594904271; cv=none; d=google.com; s=arc-20160816; b=cbC2yuo4l/SnHdCRoy83zFfLst+A2Hk7ca31U/mMqpQZvFom6WR7hEXvtLdXoDqeOZ iBaYZ8H7ClnuqE0ZHA66lVPQr8rJYgmVdBw/wfAdYa9QHeaN9L/WSmolmVPrROK7pJ04 hU277F+tghDtDg7YuRXwqrAFDCrZOwL4JOhGKogutDqnZeqfimp7Wkp86RFAJ6S+/ExV Wx7QlKh5BUyBzxrBZlE0qrc+PmkEi9p7tYyH8zfLXXhyjjkSbYZWbrJFwE8UhZXWxjBr JOw8LDgRX/jkLVS2gp2g5Lq3o/GTZYxjhmbgolU9/9VmYIJ//LsrctmCzz7/wexWBY4W M9IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:references :in-reply-to:cc:to:from; bh=UqETfceBCNTNRvGAcpMYI/Z2jW0MfYc18Q8KOg70pDg=; b=rk4HBK8sThcp0BWZ8Rk552HQpMDSEJAl6ed8Lr03miYi9FkrGgfTAOp0jVTL1n6zf3 cJgsz03Tchq03YzSm/236mkcZFAlLtw76wQGaHrE4+xJ4PVOZdd7TnNvnjJDTPYtEvhN Hvyzo7ilSqpZKuP5v4vB0VxlVQHVcgUfdpMNdIcHC+1KvfmTMka29UbKXd0VoANOXuPt dUOEy8B3UmjWURjWUI1HdVDj3B3uqi/dh800WQRfqZnkeddyfBsxlwCwS5MpaiSp5wPc RvQJyLXOMavj2KGp3+MSWvu+HXHUzP9XLkIIuzvXZ1iHwNRDda7gWl9m6ujue3tjAjg1 0UvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mf27si3186907ejb.83.2020.07.16.05.57.28; Thu, 16 Jul 2020 05:57:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728817AbgGPM4d (ORCPT + 99 others); Thu, 16 Jul 2020 08:56:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728791AbgGPM40 (ORCPT ); Thu, 16 Jul 2020 08:56:26 -0400 Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86A7EC061755 for ; Thu, 16 Jul 2020 05:56:26 -0700 (PDT) Received: by ozlabs.org (Postfix, from userid 1034) id 4B6vQ92NLtz9sTm; Thu, 16 Jul 2020 22:56:16 +1000 (AEST) From: Michael Ellerman To: mpe@ellerman.id.au, Sourabh Jain Cc: linuxppc-dev@ozlabs.org, mahesh@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, hbathini@linux.ibm.com In-Reply-To: <20200713052435.183750-1-sourabhjain@linux.ibm.com> References: <20200713052435.183750-1-sourabhjain@linux.ibm.com> Subject: Re: [PATCH v6] powerpc/fadump: fix race between pstore write and fadump crash trigger Message-Id: <159490401653.3805857.8284745366151771293.b4-ty@ellerman.id.au> Date: Thu, 16 Jul 2020 22:56:16 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Jul 2020 10:54:35 +0530, Sourabh Jain wrote: > When we enter into fadump crash path via system reset we fail to update > the pstore. > > On the system reset path we first update the pstore then we go for fadump > crash. But the problem here is when all the CPUs try to get the pstore > lock to initiate the pstore write, only one CPUs will acquire the lock > and proceed with the pstore write. Since it in NMI context CPUs that fail > to get lock do not wait for their turn to write to the pstore and simply > proceed with the next operation which is fadump crash. One of the CPU who > proceeded with fadump crash path triggers the crash and does not wait for > the CPU who gets the pstore lock to complete the pstore update. > > [...] Applied to powerpc/next. [1/1] powerpc/fadump: fix race between pstore write and fadump crash trigger https://git.kernel.org/powerpc/c/ba608c4fa12cfd0cab0e153249c29441f4dd3312 cheers