Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp497690lqt; Thu, 6 Jun 2024 09:27:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWkE/WLdYleVHS0/CNc5jzDECfXQVdwLC0fbQJACn2e5q8TJvxvFdFHfZVpymuYTTSwIqEuk5XJceuwl24A7SWsA1+b9ybtW1r5yvV5eg== X-Google-Smtp-Source: AGHT+IFGM1mbE9iRRY501bl2va70/QBDPSyig1AWXkXgd6ItqFCL6wvOkIycciifcmyXY3ait4t4 X-Received: by 2002:ac8:57cb:0:b0:43e:e6e:21d7 with SMTP id d75a77b69052e-44041b7ac6dmr1465511cf.26.1717691230850; Thu, 06 Jun 2024 09:27:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717691230; cv=pass; d=google.com; s=arc-20160816; b=jHg1YyrV4C14+E5YgV9i209JH93tFqQospy80u+qo4oTfh9ECpWHynb9DfZyn6rUXX p8nlQLGk9vivUAzF5iG+8CVherWcJP5UQYosbe+YrUkZhWm6s+Jm4WYnbcYlBtn4HQCF bQe1LckMkqnPh5L8annGysm6lhhGPFgoSjD5ZUpmQQuDlbSznDkZYU2dOJotiOkrJLSY XqfUudYxaDcOsJbbtvwmLe+cOEiRRWdF4wrCq8aIkzlzPYk1tqgOWaiwg8PKrVIeyAhQ ZZiYtUCIqPgT641WVYsgCLdqo8riHF3JOrIEwGCLLMPaQC1ZfhCK6zZhyd1uPf4EbuBW Vnkg== ARC-Message-Signature: i=2; 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:dkim-signature; bh=42y5Ts4XGs8+hdA9l1hvuOj8/iXU5GJuSgRH8B875R4=; fh=QbvAQda5HOO77Yar1kKBSFj25McCrjke4kATm1VU0y8=; b=mb9FnZ8bhtBae+yr9Y5fS8OGj7Dessl9cf0f8EbbA4lxLMxdf3UsHP4cBeTVDs+QHu LMxTgFy8jhhj5V5dG44lq0CGiWOgCBh1HFB6J/+kVTkwD/0CSVUEkJr0ffHhhLJ5lt0B TzcuDhwx28lrIPu41dLkQRAyEQVQzxB7xrwN+GFbIyP+lE3s/9f6UTdF6nax8/LBK4vs +1A1oWNS+eia2WgpNgA2zoDkvYlXaeWqFNtSph5NV4nUrbAZArLOalSVIhtLR358EQ7H zLgflP9YZ10eYsFYnCYdcG4dpMMCNHayQFCMmLvMYjdDJSQWFnbv4axE2kGttMdqPUUz 5Ytw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="sK7/fdav"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-44038b3da0fsi8708751cf.450.2024.06.06.09.27.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 09:27:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="sK7/fdav"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9004B1C21984 for ; Thu, 6 Jun 2024 16:27:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 516E219750B; Thu, 6 Jun 2024 16:27:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sK7/fdav" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7A0941B969; Thu, 6 Jun 2024 16:27:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717691222; cv=none; b=LwZThL0o63R+DKb05fih/pxYrTXaRsZPRz0LWBOtnZlZDpshZGiZ/I+0TZcEaILBfL4dUleXt94OJUnXvMCM9CnV5zWT0awUKA8vOnY0P0hW1Owho38w4rgNm5cQK7bxgk4naWCjEVbq8pzzbCXsfQjFMM1ZYYH/BaYKviG4dj0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717691222; c=relaxed/simple; bh=CZd+hSP2oTqWrt2DXzt9wijlVem+0PY7P0CiMx8jw6k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tOKWUPNfHgItFqA/yFXfbAiOlU/HkYlz7VQ0BEgdxnwao1YMZQIae3o+LRkADH/wc71e9fNnRXlL2HE8TIDVAHBNxA6gzIQ+MUfIsokOowmEVWVNc8qCgg83cqI4iSgFSkUjZF2XyTCtm81J/g81Oo1z4GRpPfUIQ9E5lWgX6xA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sK7/fdav; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D28CC2BD10; Thu, 6 Jun 2024 16:26:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717691222; bh=CZd+hSP2oTqWrt2DXzt9wijlVem+0PY7P0CiMx8jw6k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sK7/fdavea2Fv2h4EQ9Uly7AxR4NwJYBncYllJqe6rx+PZtO8KsPTWgeXGA8pIuu3 0wLzbdGMhgGMAKhDNjvp4DA034r/soZZmpayXD/9W0BHp7djmILabFRd6YpmfMA9ce 9rshdgwGjJOi9CxeP3uNag1OaWbmRlwJau/vQFQUmNFiAA9TyrV7i4xPVgVegfbcHg 5itFBzlRWBtwHK0ktXAw5fCZAZCbqWXic+rwtvPI3RFZUJNkGQSCmhUdgVkhRKQ9Nm 4UI01c1Yyb4ZelbxkED7EQzu6LBqH7LMzrrR9d4xuAZenKq33vsdhpzz7UC2hvHxkE o0z0lE/o+sfPQ== Date: Thu, 6 Jun 2024 17:26:56 +0100 From: Simon Horman To: Jijie Shao Cc: yisen.zhuang@huawei.com, salil.mehta@huawei.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shenjian15@huawei.com, wangjie125@huawei.com, liuyonglong@huawei.com, chenhao418@huawei.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net 1/2] net: hns3: fix kernel crash problem in concurrent scenario Message-ID: <20240606162656.GM791188@kernel.org> References: <20240605072058.2027992-1-shaojijie@huawei.com> <20240605072058.2027992-2-shaojijie@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@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: <20240605072058.2027992-2-shaojijie@huawei.com> On Wed, Jun 05, 2024 at 03:20:57PM +0800, Jijie Shao wrote: > From: Yonglong Liu > > When link status change, the nic driver need to notify the roce > driver to handle this event, but at this time, the roce driver > may uninit, then cause kernel crash. > > To fix the problem, when link status change, need to check > whether the roce registered, and when uninit, need to wait link > update finish. > > Fixes: 45e92b7e4e27 ("net: hns3: add calling roce callback function when link status change") > Signed-off-by: Yonglong Liu > Signed-off-by: Jijie Shao Reviewed-by: Simon Horman