Received: by 10.213.65.68 with SMTP id h4csp1129025imn; Wed, 14 Mar 2018 10:24:49 -0700 (PDT) X-Google-Smtp-Source: AG47ELuD6XmK1cpdIDnW0NsiZsqLdMn5kVaF2Smclcy36rQ+TNwKPdxUM7/nwpYdBgrKGa98ayRY X-Received: by 10.99.169.10 with SMTP id u10mr4386061pge.163.1521048289788; Wed, 14 Mar 2018 10:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521048289; cv=none; d=google.com; s=arc-20160816; b=go2YvbN/59Zrstz3OqXk8bYxic5YW6+6Pkl/jy0iBb1/tTanoZujP5TbrW1GBA/fNv RtrFLs1SkhNd0a/3ZNdkiZnZDgLj4Q9388ISesK6b2gm2o0NKT8mAl/PvylhuvFkM47T UJBNAYJ9YRx12cpU8Tpa9aPcYaTUQUpBxOJ8B0BooCN1LJOt9mQ20zrYDwuBG6VF1o2L xPQO83p/0gCf+eHj/943HLfii5v9NuMrjHjnY/PHu2ZpFslH+pWPXoigN/13XCSXXwE8 L6C/FD/+vfLdzsylUiKJXt5/RJpVw/sSRVKEgU4P7dAakfseTrq7T7VecTcwRqMsZ6/4 dfSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=bNu9lnpxQgo0kQYdiNuPVy7/PMUH2vwpjPWOIauYbjk=; b=t6DXJ8AFkxSTdmgW9A1Ms/4/vkTuUhiYtG9DbyEhtvZR/J9964OQ2lxRkihxi21LeS hFgTeA2Xgg6U28iT5L5V0dD8OAszO3K1gmNSQB68g8UQJRZ3PUFrqG3ATT+9ObHBLh79 O2euNbkANmjzn/gN4yxwkoBRZIXfe4AlG1PyyZM4KsBVZgZd/KWEHxh0+8yLI+w1LFqY 5nl11nIQ8XlfM1VGHPTJ9NZWT5qYg2JsqSpIECpPcdd8kgo0nSTtoBPiMD6DZ2gjIWny m7RFDRgLR2W9QsJSoOsfYn865D+7d31LL1ragcF61q9L5kkhH/sGnXV+V5QvGuMEXR/2 5EIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=YJ/pVAa1; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si2441160pfe.20.2018.03.14.10.24.35; Wed, 14 Mar 2018 10:24:49 -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; dkim=pass header.i=@broadcom.com header.s=google header.b=YJ/pVAa1; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752253AbeCNRWz (ORCPT + 99 others); Wed, 14 Mar 2018 13:22:55 -0400 Received: from mail-ot0-f177.google.com ([74.125.82.177]:46860 "EHLO mail-ot0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752065AbeCNRWw (ORCPT ); Wed, 14 Mar 2018 13:22:52 -0400 Received: by mail-ot0-f177.google.com with SMTP id g97-v6so4018372otg.13 for ; Wed, 14 Mar 2018 10:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bNu9lnpxQgo0kQYdiNuPVy7/PMUH2vwpjPWOIauYbjk=; b=YJ/pVAa183QGg6WV8Vo3NqfqJ1oJXgDiDyL9wPyGeS9Q3xmLMXyEbFjloNrUT5edCr US/WS8pR2WvCLAjqaSA23yOGXw1yB51kQu3hL+7kYO+0Iro8ozMoeyqtE7RipuWLkMlB ibGRYPcsKELl4nxvOvDENE1k2AW9Zd6iUgOmQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bNu9lnpxQgo0kQYdiNuPVy7/PMUH2vwpjPWOIauYbjk=; b=ojyptUvofK7b/EeCFA155RFGpfbWRYghuLMAdckEFMTbd1V0R6Dy4bbYb9XqxdzxXx akW3dYSjOGd5rZGsskFJEkgEpdmH3zOvJkbjGEyVVDEC7kwp8A+/7pvT3BnVrh97FMf+ HgDywTl4I7hJEApXpUFRy4mc33wXOIJ/Tt4oPmTMH6f5ndwD6uRatSLpa8fHTIVGfKgi vLqfcMxbdtc1exWvFLOf8ij9jay/A0uMbnX2j46DvXGYypReDPjw6Mf9EyF+uOYPmMqP V2hdLWyeRtTiCFnRFyx43UjkkI1JVQwSWHDQNr/rX0x0F/0b5sPNg2/A0KWNZnHylWG0 AvyA== X-Gm-Message-State: AElRT7EjzAcpYcuq1DXNxvWZ0hutoSyjBpEHUqpNl+P/EY81sr+zYWQ0 39vZsrt0JGdx7BiiEg5AHNLk9iwiDmvUM3KiOBRZUg== X-Received: by 10.157.59.10 with SMTP id z10mr1905508otb.366.1521048172254; Wed, 14 Mar 2018 10:22:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:d07:0:0:0:0:0 with HTTP; Wed, 14 Mar 2018 10:22:51 -0700 (PDT) In-Reply-To: References: From: Michael Chan Date: Wed, 14 Mar 2018 10:22:51 -0700 Message-ID: Subject: Re: [PATCH net] tg3: prevent scheduling while atomic splat To: Jonathan Toppins Cc: Netdev , Andy Gospodarek , Siva Reddy Kallam , Prashant Sreedharan , Michael Chan , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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