Received: by 10.213.65.68 with SMTP id h4csp1140732imn; Wed, 14 Mar 2018 10:46:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELvuEeUSGEF4bUn3vN9ysI8TYWWBgE+P8UHZgoq6dZgljkprpbtsCBDHdjYfgs0vtJyZKI/g X-Received: by 10.101.81.76 with SMTP id g12mr4441463pgq.88.1521049575510; Wed, 14 Mar 2018 10:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521049575; cv=none; d=google.com; s=arc-20160816; b=H5rvdFkDzIvywiKDD/M38HCysozpK/sLTQ6drhjBT0I/cYmYO11ftuJpSQDjDCPIpe kUsWHLs0qzZCUdTO58RkGUpS1fsYMGQx7BeR0t7c2RkqUn6tmCV9CV3pGcFw6aA1m4+a CnnXxpKz4WQmf/aiX0orDq7NHetBBdTdoKeeDBIEWnPHy+d2BaktTuaVa+z2ic3fS1eJ NyHxZqvwvlZ46c2JU2u/OJXTlg4nLF9IMeOV2vYzoFqKvE00knNWANyOrgYdqRD3ZsVQ 0iVEH6WYG5TG5TOdD2+kK21a1XeOJ7l4SOcF4hWMVfo0E8BEYumm9n6dPIULIxf4/WgP hk0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=ha8YrPaW7oJoPfFnK1hOJmaKijK/P/Njj7Yz2t057n0=; b=bOZst3wuLU8oyGxeoFZqvLiq5TcH3kUvTLGDGu1IOpOVrOGeXHBubGMpW8Xg5MkE9K oitqyLbhLGHJUrZRgTDaN992eHgAluc3ZKzKkGXV5IpmcI7opXv63mQYS8qFR2t/X9zr a5jwmPFdkYtw8z5ZBDWdk4DeyFao9FOH4NQ2Ycihss0hc5Ib4/YnZ+nbh5koXxXbBdL+ ZhFwBKVDzARVyRkBMylU7Zrh9UjSF4p+n1czCHmCOqvXrtJE2bTg6wDvssRRhTPccQaj G+S3G4mxFAkpNgsyABIv8QpG3nmvifIEhqtEqm04Penye+ljd9XVvOPy0U58HO6e9Ss7 CVFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si410985pgn.493.2018.03.14.10.46.01; Wed, 14 Mar 2018 10:46:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752381AbeCNRna (ORCPT + 99 others); Wed, 14 Mar 2018 13:43:30 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:35830 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751381AbeCNRn3 (ORCPT ); Wed, 14 Mar 2018 13:43:29 -0400 Received: from localhost (unknown [172.58.224.200]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 51E2B145BEC4C; Wed, 14 Mar 2018 10:43:27 -0700 (PDT) Date: Wed, 14 Mar 2018 13:43:24 -0400 (EDT) Message-Id: <20180314.134324.74418674311685220.davem@davemloft.net> To: michael.chan@broadcom.com Cc: jtoppins@redhat.com, netdev@vger.kernel.org, andy@greyhouse.net, siva.kallam@broadcom.com, prashant@broadcom.com, mchan@broadcom.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] tg3: prevent scheduling while atomic splat From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 14 Mar 2018 10:43:29 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Chan Date: Wed, 14 Mar 2018 10:22:51 -0700 > On Wed, Mar 14, 2018 at 9:36 AM, Jonathan Toppins wrote: >> The problem was introduced in commit >> 506b0a395f26 ("[netdrv] tg3: APE heartbeat changes"). The bug occurs >> because tp->lock spinlock is held which is obtained in tg3_start >> by way of tg3_full_lock(), line 11571. The documentation for usleep_range() >> specifically states it cannot be used inside a spinlock. >> >> Fixes: 506b0a395f26 ("[netdrv] tg3: APE heartbeat changes") >> Signed-off-by: Jonathan Toppins >> --- >> >> Notes: >> The thing I need reviewed from Broadcom is if the udelay should be 20 >> instead of 10, due to any timing changes introduced by the offending >> patch. > > Thanks. 10 us is correct. > > As a future improvement, we might want to see if we can release the > spinlock and go back to usleep_range(). The wait time is potentially > up to 20 msec which is quite long. > > Acked-by: Michael Chan Applied, thanks everyone.