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=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,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 E5503C282CB for ; Fri, 8 Feb 2019 13:02:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE8F420844 for ; Fri, 8 Feb 2019 13:02:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727636AbfBHNCm (ORCPT ); Fri, 8 Feb 2019 08:02:42 -0500 Received: from ozlabs.org ([203.11.71.1]:36793 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727611AbfBHNCm (ORCPT ); Fri, 8 Feb 2019 08:02:42 -0500 Received: by ozlabs.org (Postfix, from userid 1034) id 43wwML0Kf6z9sNH; Sat, 9 Feb 2019 00:02:37 +1100 (AEDT) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: edeb304f659792fb5bab90d7d6f3408b4c7301fb X-Patchwork-Hint: ignore In-Reply-To: <20190129110618.13481-1-vaibhav@linux.ibm.com> To: Vaibhav Jain , linuxppc-dev@lists.ozlabs.org, Frederic Barrat From: Michael Ellerman Cc: Philippe Bergheaud , Christophe Lombard , stable@vger.kernel.org, Alastair D'Silva , Andrew Donnellan , Vaibhav Jain , Christophe Lombard Subject: Re: [RESEND, v3] cxl: Wrap iterations over afu slices inside 'afu_list_lock' Message-Id: <43wwML0Kf6z9sNH@ozlabs.org> Date: Sat, 9 Feb 2019 00:02:37 +1100 (AEDT) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, 2019-01-29 at 11:06:18 UTC, Vaibhav Jain wrote: > 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 Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/edeb304f659792fb5bab90d7d6f3408b cheers