Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4327595rdb; Thu, 28 Dec 2023 19:31:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtKDzZPPoweaBc6fvsstnrC2MgOiVh6bJVEtL9BOCHzz+btqpIdBZZHjxqjLdEYxkrDrTZ X-Received: by 2002:a05:6871:10b:b0:1fb:75b:131a with SMTP id y11-20020a056871010b00b001fb075b131amr13512792oab.108.1703820662783; Thu, 28 Dec 2023 19:31:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703820662; cv=none; d=google.com; s=arc-20160816; b=VPTAnffny45ylf6cjdSGxp/3hZZjPuON7IGifnPc5E0P7Dhm7ALJWbsrSJ8JEI1yEC h4aDOGJYohwd/CV5UNrlEEdR7igtOyahYSNa1v0TE3t9OitSGpLnUluue30ZWXFExc65 dzYP9KrqN/dfmveFga3V7lwF0C0OTJo5iqP6l7PvCbThIf2cTp6ySMp7JzHxBOkWWg0k mytIaq1MWKNxhEeeronavCnJs6of28YQULSyGotTp7u5NKa1ZuRu6TY8gqWtoxwHTPyF 4ZW6G/liU9hlLJnbVp3riuhI46uUEQegiTjv1ocJw6UFC6hSOTcUtYeTLWaSxAjmCWvF RSBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=358C8gYTbp7TWkT5R/b1Snh5KbO5kHXbhpj+cZbKuas=; fh=Enn01pe9rVbrvtaPmiQQf6F0A2abKX8ZWD6c+djp/8Q=; b=G6AdMopX+N9WhsEuYBvjFCe1zeq1NGZ1Hmhn4l3B+ii8PPxbpAuHA9nyx0X1RF2FyE 5Y1BcfmpYodhwDTvxxTFuk0sXnyGgDwRyR7bBgBU8K24j9avkchsl9vEc9+cwR2b9beo iwRPSbJECztwEIDZ8Pp6CCtpZKicf05pPrVARB4kRH9Vs8JVxBq65iipVmBg6gNgQ7dP fUJA99kFRDXSTOmp13MYe5cK3sBo/vjLqyySDhnkgqwd6FffXSpPOcFDUUnZrzbhrfDj /4f2TeZ7dC3MU7SRdCj7ZgjzU1eriF154Bie93bQyJSlYjUdP64QUYkSSNEstiZq758S sU1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-1086-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1086-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p21-20020a635b15000000b005cd84895879si14214356pgb.789.2023.12.28.19.31.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 19:31:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1086-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-1086-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1086-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6E1E12859E2 for ; Fri, 29 Dec 2023 03:31:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D993881F; Fri, 29 Dec 2023 03:31:00 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83F918467; Fri, 29 Dec 2023 03:30:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1rJ3aD-00FGCm-U3; Fri, 29 Dec 2023 11:30:50 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 29 Dec 2023 11:31:00 +0800 Date: Fri, 29 Dec 2023 11:31:00 +0800 From: Herbert Xu To: Tom Zanussi Cc: davem@davemloft.net, fenghua.yu@intel.com, rex.zhang@intel.com, dave.jiang@intel.com, tony.luck@intel.com, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org Subject: Re: [PATCH] crypto: iaa - Account for cpu-less numa nodes Message-ID: References: <00e3eea06f5dde61734a53af797b190692060aab.camel@linux.intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00e3eea06f5dde61734a53af797b190692060aab.camel@linux.intel.com> On Tue, Dec 26, 2023 at 02:53:26PM -0600, Tom Zanussi wrote: > In some configurations e.g. systems with CXL, a numa node can have 0 > cpus and cpumask_nth() will return a cpu value that doesn't exist, > which will result in an attempt to add an entry to the wq table at a > bad index. > > To fix this, when iterating the cpus for a node, skip any node that > doesn't have cpus. > > Also, as a precaution, add a warning and bail if cpumask_nth() returns > a nonexistent cpu. > > Reported-by: Zhang, Rex > Signed-off-by: Tom Zanussi > --- > drivers/crypto/intel/iaa/iaa_crypto_main.c | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt