From patchwork Sat May 21 03:13:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Liu X-Patchwork-Id: 9130255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D881B60777 for ; Sat, 21 May 2016 03:13:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCCA027BF1 for ; Sat, 21 May 2016 03:13:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C15CE27F17; Sat, 21 May 2016 03:13:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CB5327E72 for ; Sat, 21 May 2016 03:13:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751814AbcEUDNe (ORCPT ); Fri, 20 May 2016 23:13:34 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:34083 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751725AbcEUDNc (ORCPT ); Fri, 20 May 2016 23:13:32 -0400 Received: by mail-oi0-f65.google.com with SMTP id r64so16479509oie.1; Fri, 20 May 2016 20:13:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=piTPjR8/gAkH9bNH0MB8Uceh2bfmzpKfU+5EIME1jpA=; b=iRfG9LNzW4ePuhMdSxlrY+Me6JyKs3RhCTlk9HBW5fOGNNoe1T/1FAM6VMoMx/Z0uH AZe2rxGrLpBrojZgihGpQz/vB4rjz1VYVMzUGIN0PQo/in7gxkaxJliLL9QmcHnW3tQL /RVK4uMQZ6x1acYRcdBRAGPV5QZSSjf533FsumeDf4oWMKAy1sNWIVN0SSo4PKsGF5OS 9obauY6F77noLJLCgHng2s23Ae79jcimo6zlOam+I0E1lchnygtB55f5zylBM5O+8V8z RVi5TsZksId9I18YnNClBIcEIhdwW/cQXHwSOEfVaSRn9IZnh17fn+APE9KkkFuBit9K /inQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=piTPjR8/gAkH9bNH0MB8Uceh2bfmzpKfU+5EIME1jpA=; b=PBG5niIdrbp3yiPrJvsmOY/ZW7PVpYG3fka8f0UsFls/RPwrNKiKi9PsPo6E4rCMMc Fs20z7bhYZ2xoMxuvG0g3bVrCWWA3WYU7G2mlvz+Lpx04xRtPS/CCnvuz/080wvCoUmj lS35J7mRFGKnz6zvpEVy+8y0uqdOQ/4+i9Q1PoxaIKP/F3lFohWrWO1Q4P1zGjlDJCpA bnMHzLltuD6+TdiTKZqQobTm9rH/CORS3TT1YQY1AISNvUcKiLUYuUfblxsm8CIEV8PY fCUEw+mIeoHCjhduleR0rpTksB256D1Px7aP7YmvsHF9eh2OTMIv7xAt1wU/F6jrswlV lKRw== X-Gm-Message-State: AOPr4FUxY1AJ0A2FOjvSdL4sM3arBt3TDnVhyT8f/tGefWkTIgyRIGe20wLE2luu1k7AwnaGU9n91MG9qmtthQ== MIME-Version: 1.0 X-Received: by 10.202.89.68 with SMTP id n65mr3458770oib.138.1463800411053; Fri, 20 May 2016 20:13:31 -0700 (PDT) Received: by 10.157.43.143 with HTTP; Fri, 20 May 2016 20:13:30 -0700 (PDT) In-Reply-To: References: <1463750386-6259-1-git-send-email-matwey@sai.msu.ru> <20160520201019.GA3432@uda0271908> <20160520211236.GB3432@uda0271908> Date: Fri, 20 May 2016 22:13:30 -0500 Message-ID: Subject: Re: [OOPS] cppi41_dma_channel_program: Unable to handle kernel NULL pointer dereference From: Bin Liu To: "Matwey V. Kornilov" Cc: Bin Liu , Linux OMAP List , linux-usb@vger.kernel.org, dmaengine@vger.kernel.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, On Fri, May 20, 2016 at 4:20 PM, Matwey V. Kornilov wrote: > 2016-05-21 0:12 GMT+03:00 Bin Liu : >> Hi, >> >> On Sat, May 21, 2016 at 12:05:06AM +0300, Matwey V. Kornilov wrote: >>> By the way, is it ok that function musb_rx_dma_iso_cppi41 uses >>> hw_ep->tx_channel? I would suppose that it should use rx_channel >>> instead. >> >> I just got here, and am wondering the same. But the question is why just >> your case hit the problem. I will try to look at it more next week. >> >> I had an impression the linux-usb@ has a discussion before about >> rx/tx-channel messing up, will have to look it up. >> > > Thank you. > If you need additional info, I can use kgdb with this issue. After reviewed the code, it must be hw_ep->rx_channel instead. It is likely a bug caused by commit 069a3fd (usb: musb: Remove ifdefs for musb_host_rx in musb_host.c part1). Please test with the following patch. Regards, -Bin. -----8<--------- u32 length, res; Reported-by: Matwey V. Kornilov Acked-by: Tony Lindgren --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 2f8ad7f..9b2553c 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -1551,7 +1551,7 @@ static int musb_rx_dma_iso_cppi41(struct dma_controller *dma, struct urb *urb, size_t len) { - struct dma_channel *channel = hw_ep->tx_channel; + struct dma_channel *channel = hw_ep->rx_channel; void __iomem *epio = hw_ep->regs; dma_addr_t *buf;