Received: by 10.213.65.68 with SMTP id h4csp1131321imn; Wed, 14 Mar 2018 10:29:05 -0700 (PDT) X-Google-Smtp-Source: AG47ELt0bua/TKBWeBjYNq2ynanSJYcd3iBwUbVctB88zmRFAaJwYYc9miZImsrLnyK4hDlfa9xA X-Received: by 10.99.126.72 with SMTP id o8mr4369117pgn.256.1521048545272; Wed, 14 Mar 2018 10:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521048545; cv=none; d=google.com; s=arc-20160816; b=cfI2SFeprCteMo76S7zYfCbJuNp+k+k1KfDgZsee5TcIuW6TBUXkVI4BmWCqLLnoka dH8+3iT3iLpXAhp4lbrn4RFMj1J17tv2cH4EWO597WjfcYaxFFU+TN+WGh5upFZEjLYj 4Mp5RUq1nPVrU6/BpsB3tLqAcIZ4VDZUOt7BUEu3rOtBFgSR7eWEAZic4OMaSGOlmqSZ tzyXCYtdIqmHufqzM2DT5LGj+/moZ37NFerUKJS6XYys6mGE8jYSD5GiKWyxIiDWwwN3 whX9ZDqLEk29W1J0SJh01LsRJ9bHdJbkz8LVlOtxqPLzsT795leA67Sd5FHOFbUh8E+Q OhFg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject:reply-to :arc-authentication-results; bh=HWW4owG8xjaoT36yKVbcMnmt2zYlicmg5M51LzcbFpk=; b=YvCpsRMjFafUiT7EHsOkB4etPRX6siCPhk8yHmWrKEsr60PwTZQw+NnrqW8wO8zp+A oDGSGfdBimqWsqVLQQjgS0vzJjaqbuk6JCxMhKLSaPcWyI900cyPL+c4mMoFM2QES38n q7ipfUHjeE77RhxpEIBHeqhCpp4qKJKkXGVADcbWjThwhUOdjsiwWaACBUGAcJjlLzfA 1Ut6Ae+E03iGPnSlP1mv1q4902H0szEy3j0jnKJYe23we+AFTGfC+Xwt0rEr1brYBexQ R2ETu/QmJfNomK6Pl6X0X5aGZvzMep1xuTucyNvm0Y4xC2HTEp2vf9aDb3/KLzDcx9Wp Cfig== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f125si2113179pgc.736.2018.03.14.10.28.50; Wed, 14 Mar 2018 10:29:05 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751555AbeCNR1o (ORCPT + 99 others); Wed, 14 Mar 2018 13:27:44 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56386 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751279AbeCNR1m (ORCPT ); Wed, 14 Mar 2018 13:27:42 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CFD58E44B5; Wed, 14 Mar 2018 17:27:41 +0000 (UTC) Received: from jtoppins.rdu.csb (ovpn-124-69.rdu2.redhat.com [10.10.124.69]) by smtp.corp.redhat.com (Postfix) with ESMTP id 881C110B7C5B; Wed, 14 Mar 2018 17:27:41 +0000 (UTC) Reply-To: jtoppins@redhat.com Subject: Re: [PATCH net] tg3: prevent scheduling while atomic splat To: Michael Chan Cc: Netdev , Andy Gospodarek , Siva Reddy Kallam , Prashant Sreedharan , Michael Chan , open list References: From: Jonathan Toppins Organization: Red Hat Message-ID: <266eae62-bef2-6c51-415f-cbacc1669e30@redhat.com> Date: Wed, 14 Mar 2018 13:27:41 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 14 Mar 2018 17:27:41 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 14 Mar 2018 17:27:41 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jtoppins@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/14/2018 01:22 PM, Michael Chan wrote: > 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. Agreed, glad it is not just me wondering why a lock needs to be held for reads. :-)