From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Peter Chen <peter.chen@nxp.com>
Subject: [PATCH 4.4 05/21] usb: chipidea: move the lock initialization to core file
Date: Wed, 30 Nov 2016 10:27:21 +0100 [thread overview]
Message-ID: <20161130092655.175639108@linuxfoundation.org> (raw)
In-Reply-To: <20161130092654.890709900@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chen <peter.chen@nxp.com>
commit a5d906bb261cde5f881a949d3b0fbaa285dcc574 upstream.
This can fix below dump when the lock is accessed at host
mode due to it is not initialized.
[ 46.119638] INFO: trying to register non-static key.
[ 46.124643] the code is fine but needs lockdep annotation.
[ 46.130144] turning off the locking correctness validator.
[ 46.135659] CPU: 0 PID: 690 Comm: cat Not tainted 4.9.0-rc3-00079-g4b75f1d #1210
[ 46.143075] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[ 46.148923] Backtrace:
[ 46.151448] [<c010c460>] (dump_backtrace) from [<c010c658>] (show_stack+0x18/0x1c)
[ 46.159038] r7:edf52000
[ 46.161412] r6:60000193
[ 46.163967] r5:00000000
[ 46.165035] r4:c0e25c2c
[ 46.169109] [<c010c640>] (show_stack) from [<c03f58a4>] (dump_stack+0xb4/0xe8)
[ 46.176362] [<c03f57f0>] (dump_stack) from [<c016d690>] (register_lock_class+0x4fc/0x56c)
[ 46.184554] r10:c0e25d24
[ 46.187014] r9:edf53e70
[ 46.189569] r8:c1642444
[ 46.190637] r7:ee9da024
[ 46.193191] r6:00000000
[ 46.194258] r5:00000000
[ 46.196812] r4:00000000
[ 46.199185] r3:00000001
[ 46.203259] [<c016d194>] (register_lock_class) from [<c0171294>] (__lock_acquire+0x80/0x10f0)
[ 46.211797] r10:c0e25d24
[ 46.214257] r9:edf53e70
[ 46.216813] r8:ee9da024
[ 46.217880] r7:c1642444
[ 46.220435] r6:edcd1800
[ 46.221502] r5:60000193
[ 46.224057] r4:00000000
[ 46.227953] [<c0171214>] (__lock_acquire) from [<c01726c0>] (lock_acquire+0x74/0x94)
[ 46.235710] r10:00000001
[ 46.238169] r9:edf53e70
[ 46.240723] r8:edf53f80
[ 46.241790] r7:00000001
[ 46.244344] r6:00000001
[ 46.245412] r5:60000193
[ 46.247966] r4:00000000
[ 46.251866] [<c017264c>] (lock_acquire) from [<c096c8fc>] (_raw_spin_lock_irqsave+0x40/0x54)
[ 46.260319] r7:ee1c6a00
[ 46.262691] r6:c062a570
[ 46.265247] r5:20000113
[ 46.266314] r4:ee9da014
[ 46.270393] [<c096c8bc>] (_raw_spin_lock_irqsave) from [<c062a570>] (ci_port_test_show+0x2c/0x70)
[ 46.279280] r6:eebd2000
[ 46.281652] r5:ee9da010
[ 46.284207] r4:ee9da014
[ 46.286810] [<c062a544>] (ci_port_test_show) from [<c0248d04>] (seq_read+0x1ac/0x4f8)
[ 46.294655] r9:edf53e70
[ 46.297028] r8:edf53f80
[ 46.299583] r7:ee1c6a00
[ 46.300650] r6:00000001
[ 46.303205] r5:00000000
[ 46.304273] r4:eebd2000
[ 46.306850] [<c0248b58>] (seq_read) from [<c039e864>] (full_proxy_read+0x54/0x6c)
[ 46.314348] r10:00000000
[ 46.316808] r9:c0a6ad30
[ 46.319363] r8:edf53f80
[ 46.320430] r7:00020000
[ 46.322986] r6:b6de3000
[ 46.324053] r5:ee1c6a00
[ 46.326607] r4:c0248b58
[ 46.330505] [<c039e810>] (full_proxy_read) from [<c021ec98>] (__vfs_read+0x34/0x118)
[ 46.338262] r9:edf52000
[ 46.340635] r8:c0107fc4
[ 46.343190] r7:00020000
[ 46.344257] r6:edf53f80
[ 46.346812] r5:c039e810
[ 46.347879] r4:ee1c6a00
[ 46.350447] [<c021ec64>] (__vfs_read) from [<c021fbd0>] (vfs_read+0x8c/0x11c)
[ 46.357597] r9:edf52000
[ 46.359969] r8:c0107fc4
[ 46.362524] r7:edf53f80
[ 46.363592] r6:b6de3000
[ 46.366147] r5:ee1c6a00
[ 46.367214] r4:00020000
[ 46.369782] [<c021fb44>] (vfs_read) from [<c0220a4c>] (SyS_read+0x4c/0xa8)
[ 46.376672] r8:c0107fc4
[ 46.379045] r7:00020000
[ 46.381600] r6:b6de3000
[ 46.382667] r5:ee1c6a00
[ 46.385222] r4:ee1c6a00
[ 46.387817] [<c0220a00>] (SyS_read) from [<c0107e20>] (ret_fast_syscall+0x0/0x1c)
[ 46.395314] r7:00000003
[ 46.397687] r6:b6de3000
[ 46.400243] r5:00020000
[ 46.401310] r4:00020000
Fixes: 26c696c678c4 ("USB: Chipidea: rename struct ci13xxx variables from udc to ci")
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/chipidea/core.c | 1 +
drivers/usb/chipidea/udc.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -926,6 +926,7 @@ static int ci_hdrc_probe(struct platform
if (!ci)
return -ENOMEM;
+ spin_lock_init(&ci->lock);
ci->dev = dev;
ci->platdata = dev_get_platdata(dev);
ci->imx28_write_fix = !!(ci->platdata->flags &
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1884,8 +1884,6 @@ static int udc_start(struct ci_hdrc *ci)
struct usb_otg_caps *otg_caps = &ci->platdata->ci_otg_caps;
int retval = 0;
- spin_lock_init(&ci->lock);
-
ci->gadget.ops = &usb_gadget_ops;
ci->gadget.speed = USB_SPEED_UNKNOWN;
ci->gadget.max_speed = USB_SPEED_HIGH;
next prev parent reply other threads:[~2016-11-30 9:29 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20161130092741epcas3p26e2df0db74c37be618b757b132dcab10@epcas3p2.samsung.com>
2016-11-30 9:27 ` [PATCH 4.4 00/21] 4.4.36-stable review Greg Kroah-Hartman
2016-11-30 9:27 ` Greg Kroah-Hartman [this message]
2016-11-30 9:27 ` [PATCH 4.4 06/21] USB: serial: cp210x: add ID for the Zone DPMX Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 07/21] USB: serial: ftdi_sio: add support for TI CC3200 LaunchPad Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 08/21] Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=y Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 09/21] scsi: mpt3sas: Fix secure erase premature termination Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 10/21] tile: avoid using clocksource_cyc2ns with absolute cycle count Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 11/21] cfg80211: limit scan results cache size Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 12/21] apparmor: fix change_hat not finding hat after policy replacement Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 13/21] NFSv4.x: hide array-bounds warning Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 14/21] parisc: Fix races in parisc_setup_cache_timing() Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 15/21] parisc: Fix race in pci-dma.c Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 16/21] parisc: Also flush data TLB in flush_icache_page_asm Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 17/21] mpi: Fix NULL ptr dereference in mpi_powm() [ver #3] Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 19/21] mei: me: disable driver on SPT SPS firmware Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 20/21] mei: me: fix place for kaby point device ids Greg Kroah-Hartman
2016-11-30 9:27 ` [PATCH 4.4 21/21] mei: fix return value on disconnection Greg Kroah-Hartman
2016-11-30 13:46 ` [PATCH 4.4 00/21] 4.4.36-stable review Andre Noll
2016-11-30 13:53 ` Greg Kroah-Hartman
2016-11-30 14:04 ` Andre Noll
2016-11-30 14:28 ` Eric Dumazet
2016-11-30 14:31 ` Greg Kroah-Hartman
2016-11-30 14:53 ` David Miller
2016-11-30 15:11 ` Andre Noll
2016-11-30 14:50 ` David Miller
2016-11-30 15:37 ` Greg KH
2016-11-30 16:03 ` Shuah Khan
2016-11-30 23:28 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161130092655.175639108@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.chen@nxp.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).