Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp711505imj; Wed, 13 Feb 2019 16:17:05 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ+DWlT5UOD+gpw5vjkNR5OOKP+DxfCAnfUjpYS9sHCUydGF50bOmRp6H1+mTPAj6mdlMsw X-Received: by 2002:a62:5fc4:: with SMTP id t187mr977907pfb.66.1550103425367; Wed, 13 Feb 2019 16:17:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550103425; cv=none; d=google.com; s=arc-20160816; b=r4byqgBzEmOe5VRCOFfckojrQfQZ/FF8zVh+mx8UXykIq57dE3MbO/sGiUgnb2Rsxl kHx2s+2ouMoNPIJC0VEButk3AQxNMAtxS6od7GKy8dWkvxcWmAel4QUEUgw4W8bdx2Vk WquIcBEFHMYC1ae2rCIEkVExBKcT1UyWiegg6kx4/Prba3hrB6w+qOi+dGTRSEisagzh QPD66QEmSPLVj2cb8cl/IMp1sA9f+ed+gZ/L8qaP2BGGsrp7XkvweHgORSYZrfCkh8U4 X2VtyMAipqOslpbZ7C4jZ1JUbJPoQ0rTBF+Rinh3XsZMEAkoGiwcvkRHqFQ28yHfXlHj N6bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=PHzAU4HUNBCq3y3wdeMIQBv6wIv+y+vWTm3oWd0aw0E=; b=vKpSThBfDxen2ehLZX4vaXGx2qvlEH8IJ0BOyUGPMdoZBjwI9V1QXe5HJDCOI8B7S2 +E1hC6mcmv9wV+pNKn87+dSgVjSmDb7ezskn9+lRFGRN8a8aFo8+1G1bZwoyZLOySl2G cfqGreNlKRTOv0C5w5SOec4MOwR+TnHLQWrEaNihk0oAy8KtXnEUvyl2HQUuM1TVvMYt FGTzmkBVmuLENnOtN58ycO0HjCVQpbF/Wr63s6AcqqetQMBTDKoVJ5V4BqR0Vh/OCWdH kG9D9qhr7Ne4SsSwfmvMubWa7P51tQWipHY3qQHfyY61Lriea3GSdqp83IhoLq2h/0LA kBwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Xn0DUXg5; dkim=pass header.i=@codeaurora.org header.s=default header.b=HbbSoRZ5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si722366pgi.370.2019.02.13.16.16.49; Wed, 13 Feb 2019 16:17:05 -0800 (PST) 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=@codeaurora.org header.s=default header.b=Xn0DUXg5; dkim=pass header.i=@codeaurora.org header.s=default header.b=HbbSoRZ5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393988AbfBMSom (ORCPT + 99 others); Wed, 13 Feb 2019 13:44:42 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:58730 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388097AbfBMSok (ORCPT ); Wed, 13 Feb 2019 13:44:40 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 086F860C3D; Wed, 13 Feb 2019 18:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550083478; bh=F87YOsPP9BTuLaqkEIDa5weDH2iiqGmOdN1YadkeJNE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Xn0DUXg5j3TnR2fEBhsWyuhv7TZ4UHxKyZAY2tZyAl47GBC3MNOKzkvfi9j2YJRnS NAowuQnKL10Nb/JlOWd7nEFU4xKxpLQxcwqpcVNVbRISteb2hqboMI+fFFBH8EElTF /3dQdjHWwMwBXBiuiCtAfGkVyh6wxKEeUrZjlO6U= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.1.101] (unknown [157.45.221.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D09CE60C3D; Wed, 13 Feb 2019 18:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550083476; bh=F87YOsPP9BTuLaqkEIDa5weDH2iiqGmOdN1YadkeJNE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=HbbSoRZ5E3D57TggqaplIL+7LSjb29zLnCED9DNxSum0WaWnR7UFps049LRVuzIxO 0/g57YacSkEb3vZzDguBsT2lVOq2Q1X2snOSqR/VPc1HoLb18wV+R4nhDVxcx3czm5 XRF6NSeHQpW19w4XS0XWYsWnqge6xdSegmMHkJxM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D09CE60C3D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=saiprakash.ranjan@codeaurora.org Subject: Re: BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:65 To: Pintu Agarwal Cc: open list , linux-arm-kernel@lists.infradead.org, linux-rt-users@vger.kernel.org, linux-mm@kvack.org, Jorge Ramirez , "Xenomai@xenomai.org" References: <6183c865-2e90-5fb9-9e10-1339ae491b71@codeaurora.org> From: Sai Prakash Ranjan Message-ID: <2c91af7d-4580-cedc-70ea-d38c2587c7bf@codeaurora.org> Date: Thu, 14 Feb 2019 00:14:28 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2/13/2019 8:10 PM, Pintu Agarwal wrote: > OK thanks for your suggestions. sdm845-perf_defconfig did not work for > me. The target did not boot. Perf defconfig works fine. You need to enable serial console with below config added to perf defconfig. CONFIG_SERIAL_MSM_GENI_CONSOLE=y > However, disabling CONFIG_PANIC_ON_SCHED_BUG works, and I got a root > shell at least. > > But this seems to be a work around. > I still get a back trace in kernel logs from many different places. > So, it looks like there is some code in qualcomm specific drivers that > is calling a sleeping method from invalid context. > How to find that... > If this fix is already available in latest version, please let me know. > Seems like interrupts are disabled when down_write_killable() is called. It's not the drivers that is calling the sleeping method which can be seen from the log. [ 22.140224] [] ___might_sleep+0x140/0x188 [ 22.145862] [] __might_sleep+0x58/0x90 <--- [ 22.151249] [] down_write_killable+0x2c/0x80 <--- [ 22.157155] [] setup_arg_pages+0xb8/0x208 <--- [ 22.162792] [] load_elf_binary+0x434/0x1298 [ 22.168600] [] search_binary_handler+0xac/0x1f0 [ 22.174763] [] do_execveat_common.isra.15+0x504/0x6c8 [ 22.181452] [] do_execve+0x44/0x58 [ 22.186481] [] run_init_process+0x38/0x48 <--- [ 22.192122] [] kernel_init+0x8c/0x108 [ 22.197411] [] ret_from_fork+0x10/0x50 > > This at least proves that there is no issue in core ipipe patches, and > I can proceed. I doubt the *IPIPE patches*. You said you removed the configs, but all code are not under IPIPE configs and as I see there are lots of changes to interrupt code in general with ipipe. So to actually confirm whether the issue is with qcom drivers or ipipe, please *remove ipipe patches (not just configs)* and boot. Also paste the full dmesg logs for these 2 cases(with and without ipipe). Thanks, Sai -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation