Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751629AbdFGN2Z (ORCPT ); Wed, 7 Jun 2017 09:28:25 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:36895 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751505AbdFGN2X (ORCPT ); Wed, 7 Jun 2017 09:28:23 -0400 Date: Wed, 7 Jun 2017 15:28:17 +0200 From: Richard Cochran To: Rafal Ozieblo Cc: David Miller , "nicolas.ferre@atmel.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "harini.katakam@xilinx.com" , "andrei.pistirica@microchip.com" Subject: Re: [PATCH v2 4/4] net: macb: Add hardware PTP support Message-ID: <20170607132817.GA28329@localhost.localdomain> References: <1496413439-12900-1-git-send-email-rafalo@cadence.com> <1496413690-22826-1-git-send-email-rafalo@cadence.com> <20170606183358.GA25220@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 648 Lines: 21 On Wed, Jun 07, 2017 at 11:13:36AM +0000, Rafal Ozieblo wrote: > Please look at following call-stack: > > 1. macb_interrupt() // spin_lock(&bp->lock) is taken > 2. macb_tx_interrupt() > 3. macb_handle_txtstamp() > 4. skb_tstamp_tx() > 5. __skb_tstamp_tx() > 6. skb_may_tx_timestamp() > 7. read_lock_bh() // second lock is taken Well, you can always drop the lock, or postpone the call to skb_tstamp_tx() until after the spin lock is released... > I know that those are different locks and different types. But this could lead > to deadlocks. This is the reason of warning I could see. Can you please post the lockdep splat? Thanks, Richard