From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EB91C282D7 for ; Wed, 30 Jan 2019 12:41:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40D5D20882 for ; Wed, 30 Jan 2019 12:41:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726246AbfA3Mlu (ORCPT ); Wed, 30 Jan 2019 07:41:50 -0500 Received: from ozlabs.org ([203.11.71.1]:41939 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725768AbfA3Mlu (ORCPT ); Wed, 30 Jan 2019 07:41:50 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 43qNKR6f4Zz9s9h; Wed, 30 Jan 2019 23:41:47 +1100 (AEDT) From: Michael Ellerman To: Vaibhav Jain , linuxppc-dev@lists.ozlabs.org, Frederic Barrat Cc: Philippe Bergheaud , Christophe Lombard , stable@vger.kernel.org, Alastair D'Silva , Andrew Donnellan , Vaibhav Jain , Christophe Lombard Subject: Re: [RESEND PATCH v3] cxl: Wrap iterations over afu slices inside 'afu_list_lock' In-Reply-To: <20190129110618.13481-1-vaibhav@linux.ibm.com> References: <20190129110618.13481-1-vaibhav@linux.ibm.com> Date: Wed, 30 Jan 2019 23:41:47 +1100 Message-ID: <87lg32pbas.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Vaibhav Jain writes: > Within cxl module, iteration over array 'adapter->afu' may be racy > at few points as it might be simultaneously read during an EEH and its > contents being set to NULL while driver is being unloaded or unbound > from the adapter. This might result in a NULL pointer to 'struct afu' > being de-referenced during an EEH thereby causing a kernel oops. > > This patch fixes this by making sure that all access to the array > 'adapter->afu' is wrapped within the context of spin-lock > 'adapter->afu_list_lock'. > > Cc: stable@vger.kernel.org > Fixes: 9e8df8a2196("cxl: EEH support") > Acked-by: Andrew Donnellan > Acked-by: Frederic Barrat > Acked-by: Christophe Lombard > Signed-off-by: Vaibhav Jain > --- > Changelog: > > Resend: > * Fixed the reference to 'adapter->afu' in patch description. [Andrew] > * Added the 'Fixes' tag and marked the patch to stable FYI RESEND means you didn't change anything, but you sent the patch again for some other reason, like the Cc list was wrong or you thought it had been ignored. In this case you should have just sent a v4, updating the change log is a perfectly valid reason for a new version of the patch. I've applied it, no need to RESEND ;) cheers