Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755585AbaKSIVD (ORCPT ); Wed, 19 Nov 2014 03:21:03 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:61560 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755271AbaKSIU7 (ORCPT ); Wed, 19 Nov 2014 03:20:59 -0500 X-AuditID: cbfee68f-f791c6d000004834-e9-546c52cd955b Message-id: <546C52CD.2030209@samsung.com> Date: Wed, 19 Nov 2014 17:20:29 +0900 From: Chan-yeol Park User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-version: 1.0 To: "Kirill A. Shutemov" , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Kyungmin Park , linville@tuxdriver.com, linux-wireless@vger.kernel.org Subject: Re: pull request: bluetooth-next 2014-11-07 References: <20141118133459.GB27428@node.dhcp.inet.fi> <20141118180919.GA32128@t440s.P-661HNU-F1> In-reply-to: <20141118180919.GA32128@t440s.P-661HNU-F1> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeLIzCtJLcpLzFFi42I5/e+Zpu7ZoJwQg2PrjS3WTFzIbHG26Q27 xZxrfcwWl3fNYbN4s+IOu8XWHgkHNo++LasYPWb3PWXyuPJ9NaPH501yASxRXDYpqTmZZalF +nYJXBn3Z+5lKfgiV7GlYR9rA+MByS5GTg4JAROJXXNWskHYYhIX7q0Hs4UEljFKHJrGAlPT tvA2UxcjF1B8EaPE+kcHoZxXjBJr9rxhAqniFdCSeNb7nhnEZhFQlfi+excjiM0mYCBxpaMH zBYVCJPYvmYCM0S9oMSPyfdYQAaJCFxnlPh58zHYOmGQk9ZOZoc4I1mi5+BEsAWcAuYSOw49 BzuPWcBWYsH7dSwQtrzE5jVvmUEGSQhsYpd4sPIsO8QVAhLfJh8CKuIASshK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YLpY+LglGpg5GctMi2zXHnu6bEnW28raLlIKtk+unSgLr+WYc8u R2PJ84vmBTwwiguZK/zA9NkRNbu6920LF3vObElY9JSj+lL1t2xW+9hVf0+eXVyX1OGvMFX/ Nct8Ec9wpiCOhKvKe3a71+SKOp808J99u+i22Z2z12ds0GB5tm/O3bQ5eQ7vJjwO1+YIV2Ip zkg01GIuKk4EAFEJ5MvrAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On 11/19/2014 03:09 AM, Johan Hedberg wrote: > Hi Kirill, > > On Tue, Nov 18, 2014, Kirill A. Shutemov wrote: >> On Fri, Nov 07, 2014 at 11:27:54AM +0200, Johan Hedberg wrote: >>> Chan-yeol Park (1): >>> Bluetooth: Fix hci_sync missing wakeup interrupt >> Look like this commit causes problem for me: >> >> [ 2.018671] ------------[ cut here ]------------ >> [ 2.022836] WARNING: CPU: 2 PID: 109 at /home/kas/git/public/linux/kernel/sched/core.c:7323 __might_sleep+0xbd/0xd0() >> [ 2.023166] Freeing unused kernel memory: 944K (ffff880001b14000 - ffff880001c00000) >> [ 2.030362] do not call blocking ops when !TASK_RUNNING; state=1 set at [] __hci_req_sync+0x7b/0x2a0 >> [ 2.034193] Modules linked in: >> [ 2.036133] CPU: 2 PID: 109 Comm: kworker/u17:0 Not tainted 3.18.0-rc4-next-20141117-07404-g9dad2ab6df8b #66 >> [ 2.036383] Freeing unused kernel memory: 1404K (ffff8800020a1000 - ffff880002200000) >> [ 2.038940] Hardware name: LENOVO 3460CC6/3460CC6, BIOS G6ET93WW (2.53 ) 02/04/2013 >> [ 2.040233] Workqueue: hci0 hci_power_on >> [ 2.041517] ffffffff81f51d50 ffff8800d3ecfb28 ffffffff81afc316 0000000000000000 >> [ 2.042811] ffff8800d3ecfb78 ffff8800d3ecfb68 ffffffff810fc11a ffff880000000000 >> [ 2.042812] ffffffff81f52a28 000000000000026d 0000000000000000 ffff8800d3ec9200 >> [ 2.042813] Call Trace: >> [ 2.042818] [] dump_stack+0x4c/0x6e >> [ 2.042821] [] warn_slowpath_common+0x8a/0xc0 >> [ 2.042823] [] warn_slowpath_fmt+0x46/0x50 >> [ 2.042825] [] ? __hci_req_sync+0x7b/0x2a0 >> [ 2.042827] [] ? __hci_req_sync+0x7b/0x2a0 >> [ 2.042830] [] __might_sleep+0xbd/0xd0 >> [ 2.042832] [] mutex_lock_nested+0x2f/0x450 >> [ 2.042835] [] ? _raw_spin_unlock+0x2b/0x50 >> [ 2.042837] [] ? wake_up_process+0x50/0x50 >> [ 2.042840] [] __create_file+0x71/0x2c0 >> [ 2.042842] [] debugfs_create_file+0x1f/0x30 >> [ 2.042844] [] hci_dev_do_open+0x431/0xa70 >> [ 2.042846] [] ? process_one_work+0x13c/0x810 >> [ 2.042847] [] hci_power_on+0x31/0x1e0 >> [ 2.042849] [] process_one_work+0x1d8/0x810 >> [ 2.042850] [] ? process_one_work+0x13c/0x810 >> [ 2.042851] [] worker_thread+0x6b/0x4b0 >> [ 2.042852] [] ? init_pwq+0xf0/0xf0 >> [ 2.042854] [] kthread+0x119/0x130 >> [ 2.042855] [] ? finish_task_switch+0x4d/0x140 >> [ 2.042857] [] ? kthread_create_on_node+0x240/0x240 >> [ 2.042859] [] ret_from_fork+0x7c/0xb0 >> [ 2.042861] [] ? kthread_create_on_node+0x240/0x240 >> [ 2.042863] ---[ end trace 3a40e80ec4ca7159 ]--- > At least one obvious bug that the patch in question seems to have is > that it fails to set the state back to TASK_RUNNING in case > hci_req_run() fails and we never call schedule_timeout(). This would > also seem to match the error you're getting. > > The attached patch fixes the missing set_current_state() calls - could > you please check if it fixes the issue for you? Out of curiosity, which > HW are you reproducing this with and are there any special steps > involved? Looking at the code it seems that at least some older > Bluetooth adapters could cause some hci_req_run() calls to return > ENODATA, however I wasn't able to get the warning with any of my own > adapters (I have one for pretty much every Bluetooth version). > > Johan I agree I made a bug in the previous commit and I think we need to apply Johan's patch. It is working fine on my machine. Thanks Chanyeol -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/