Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1845471ybk; Thu, 21 May 2020 17:12:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnMwLaji9t4nysTlonYrof5JqsTv5Igca3x4B0tAk6kEvy0jZ3O8Me5NHF/QxokOpOiwXd X-Received: by 2002:aa7:d691:: with SMTP id d17mr1048284edr.273.1590106355278; Thu, 21 May 2020 17:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590106355; cv=none; d=google.com; s=arc-20160816; b=K9+yi5Wb4jeKCeo6JfiVz3lA2LC7mLLLtnSmqGv3sSpxnqHKKAVTREsR1ekSKrSAT9 gOic6jF6v2fT4Lx3IOfkiKdopTTEJBvFzGTlWzhAmXI4Rb9nhzlmzWPvMZuZMpy0hdRt mvk1eM/hi+Wt/Oj8kGprfwS+0xXuqAN3sbB/q6XhX0pQz6rToxG+NhFpoT+htNk6DBQW x+/SoXQaQT1H6eL+m5YPDFl2VhG9/sOiCxoanrYZh/8WdUNsUEYCEowgJ0fSz32c0fqG PvsGiQnL9dMWkVqzfk2oKivqDs26zP3U7hXISnA0HGkieJ8wdA4yg1aTyV8921eobCh6 3pYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ShTiWXhFQZjS5cdCw5c5iEVmkBUXovNZWLuS1Cv7888=; b=n7pf5IqTa4KF8ghys20ndGllA7UYa87wb+w2AaQLJFQ+lJ9sbUvk3VOGdUMHAgKGFJ 9Gxb/EBli6cLcwR0eiDrEeFNLukjnfnrgpuBe9mB/GlCiqFu1bkpyX532khG1zsIN7A2 ypyK/ESnnIIiEt6dVTw29or9pmrjEGGTwZpdI01tNwTuuoubkO5bSeGmNHqgiAh+R6ha JCyLVESZjbUOdAe7GxIJtES70/gCRTxzPHVWoSu3tEEEFfnTzOQs4cNpo19QxUhMiyul SMeCilskqi6Iv1+Lyl3AhFJJXi0zaV4jHvsIwSnGed9QRqWpIJ1kBl3o9lBZ8E9lyZDy 7+eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ofqnPgic; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr24si4196863ejb.383.2020.05.21.17.12.12; Thu, 21 May 2020 17:12:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ofqnPgic; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730724AbgEVAJs (ORCPT + 99 others); Thu, 21 May 2020 20:09:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729771AbgEVAJs (ORCPT ); Thu, 21 May 2020 20:09:48 -0400 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3B30C061A0E for ; Thu, 21 May 2020 17:09:47 -0700 (PDT) Received: by mail-ed1-x541.google.com with SMTP id be9so8017614edb.2 for ; Thu, 21 May 2020 17:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ShTiWXhFQZjS5cdCw5c5iEVmkBUXovNZWLuS1Cv7888=; b=ofqnPgic0A6d3snWFaSYqXR6bXBywTUnsOr918T7Vjsau2FfwafBcg2+BvbwupHpnK i8zIqwaU68LuAEvmeeb6p5FBg+YCsKTCxnBQxlTsuV7mdVv0zuDiCF+VHked8F7bTUZK 5GiXwg8aW3OJ9v1FQ6LHwhFjFyYNnq6FLKf+o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ShTiWXhFQZjS5cdCw5c5iEVmkBUXovNZWLuS1Cv7888=; b=NStK0H9vpOorJaiGXX7h+KJsHeUZ13SMgVh3LLjHfyDluw5aMIZx5wEV12hSA4nt2E teRLWdiEC4A/iXDfIIEXGmlTvovB5HQc2gGie/KJvCRUyvWn2naXuCxm8lTQYYRqUXDY MP9lOF+JF2Z33s1mB1IKVHtKsvULN96aCUIYaxlSrRo2FR1S5sUyx1dJn1BAqbKLoZvH VTRM8Ko9mOXbCzG3WaBdskjR4NSPie8kcTKrVkpMVQAha8+9e3Cq16wb2KxrPwiDv5BI OfXwVX2RXKZf+yTH1nW20V4TxcgNN8DnQiTQYgAUYpXKgGXxCveNX4fSAoqGtZMdKMu0 bShg== X-Gm-Message-State: AOAM530K2hfY5RiOgC+FbBgF5htcCLCwNGJVcxhOSRcIslJ7+CVosmyA D4rlOJnfoSzE38guy/uDyX0oEoRJ1CLMTg== X-Received: by 2002:a05:6402:306a:: with SMTP id bs10mr1052559edb.227.1590106184702; Thu, 21 May 2020 17:09:44 -0700 (PDT) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com. [209.85.221.51]) by smtp.gmail.com with ESMTPSA id d22sm6098209ejb.15.2020.05.21.17.09.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 May 2020 17:09:44 -0700 (PDT) Received: by mail-wr1-f51.google.com with SMTP id s8so8411477wrt.9 for ; Thu, 21 May 2020 17:09:43 -0700 (PDT) X-Received: by 2002:a5d:66c5:: with SMTP id k5mr867242wrw.17.1590106183205; Thu, 21 May 2020 17:09:43 -0700 (PDT) MIME-Version: 1.0 References: <5ec71528.qSD3ljogzEHcLRXO%lkp@intel.com> In-Reply-To: <5ec71528.qSD3ljogzEHcLRXO%lkp@intel.com> From: Tomasz Figa Date: Fri, 22 May 2020 02:09:29 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: 6fe12cdbcf ("i2c: core: support bus regulator controlling in .."): BUG: sleeping function called from invalid context at kernel/locking/mutex.c:935 To: kernel test robot Cc: Bibby Hsieh , LKP , Linux Kernel Mailing List , linux-i2c , Wolfram Sang , philip.li@intel.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 22, 2020 at 1:57 AM kernel test robot wrote: > > Greetings, > > 0day kernel testing robot got the below dmesg and the first bad commit is > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > commit 6fe12cdbcfe35ad4726a619a9546822d34fc934c > Author: Bibby Hsieh > AuthorDate: Tue May 19 15:27:29 2020 +0800 > Commit: Wolfram Sang > CommitDate: Wed May 20 15:25:55 2020 +0200 > > i2c: core: support bus regulator controlling in adapter > > Although in the most platforms, the bus power of i2c > are alway on, some platforms disable the i2c bus power > in order to meet low power request. > > We get and enable bulk regulator in i2c adapter device. > > Signed-off-by: Bibby Hsieh > Reviewed-by: Tomasz Figa > Signed-off-by: Wolfram Sang > > 6aab46bc52 dt-binding: i2c: add bus-supply property > 6fe12cdbcf i2c: core: support bus regulator controlling in adapter > +-----------------------------------------------------------------------------+------------+------------+ > | | 6aab46bc52 | 6fe12cdbcf | > +-----------------------------------------------------------------------------+------------+------------+ > | boot_successes | 33 | 0 | > | boot_failures | 2 | 16 | > | WARNING:at_lib/kobject_uevent.c:#add_uevent_var | 1 | | > | EIP:add_uevent_var | 1 | | > | BUG:kernel_hang_in_boot_stage | 1 | | > | BUG:sleeping_function_called_from_invalid_context_at_kernel/locking/mutex.c | 0 | 16 | > +-----------------------------------------------------------------------------+------------+------------+ > > If you fix the issue, kindly add following tag > Reported-by: kernel test robot > > [ 105.730065] ### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest13/status > [ 105.730071] ### dt-test ### EXPECT \ : i2c i2c-1: Added multiplexed i2c bus 3 > [ 105.747587] i2c i2c-3: supply bus not found, using dummy regulator > [ 105.754529] i2c i2c-1: Added multiplexed i2c bus 3 > [ 105.756092] ### dt-test ### EXPECT / : i2c i2c-1: Added multiplexed i2c bus 3 > [ 105.773831] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:935 > [ 105.777468] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 189, name: kworker/0:2 > [ 105.778995] 2 locks held by kworker/0:2/189: > [ 105.779775] #0: f48249a4 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x3ac/0x1050 > [ 105.781743] #1: f4145f34 ((work_completion)(&sdp->work)){+.+.}-{0:0}, at: process_one_work+0x3ac/0x1050 > [ 105.783485] Preemption disabled at: > [ 105.783509] [] srcu_invoke_callbacks+0x14d/0x280 > [ 105.785397] CPU: 0 PID: 189 Comm: kworker/0:2 Not tainted 5.7.0-rc1-00058-g6fe12cdbcfe35 #1 > [ 105.786961] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 > [ 105.788608] Workqueue: rcu_gp srcu_invoke_callbacks > [ 105.789777] Call Trace: > [ 105.790308] dump_stack+0x32/0x4a > [ 105.790914] ___might_sleep+0x3dc/0x4b0 > [ 105.791659] ? srcu_invoke_callbacks+0x14d/0x280 > [ 105.792574] ? srcu_invoke_callbacks+0x14d/0x280 > [ 105.793677] ? srcu_invoke_callbacks+0x14d/0x280 > [ 105.794480] __might_sleep+0x10e/0x210 > [ 105.795186] __mutex_lock+0x34/0x12f0 > [ 105.795838] ? mark_held_locks+0xb3/0x100 > [ 105.796561] ? _raw_spin_unlock_irqrestore+0x13b/0x190 > [ 105.797694] ? _raw_spin_unlock_irqrestore+0x13b/0x190 > [ 105.798653] ? lockdep_hardirqs_on+0x1bb/0x420 > [ 105.799462] mutex_lock_nested+0x41/0x60 > [ 105.800155] ? regulator_put+0x25/0x70 > [ 105.800839] regulator_put+0x25/0x70 > [ 105.801641] devm_regulator_release+0x1d/0x30 > [ 105.802415] release_nodes+0x326/0x500 > [ 105.803126] devres_release_all+0xb9/0x130 > [ 105.803873] device_release+0x25/0x1b0 This is entirely my guess for now, but isn't it suspicious that device_release() has been called with interrupts disabled? Is it possible that something else introduced a bug that causes device_release() to be called in an atomic context and it only triggered with this patch, because the affected struct device now has a mutex lock in the release path? > [ 105.804548] ? srcu_invoke_callbacks+0xfa/0x280 > [ 105.805591] kobject_put+0x33e/0x800 > [ 105.806244] ? refcount_dec_not_one+0x107/0x2f0 > [ 105.807050] ? srcu_invoke_callbacks+0x14d/0x280 > [ 105.807918] __device_link_free_srcu+0x79/0xe0 > [ 105.808685] srcu_invoke_callbacks+0x160/0x280 > [ 105.809729] process_one_work+0x594/0x1050 > [ 105.810535] ? process_one_work+0x3ac/0x1050 > [ 105.811314] ? _raw_spin_lock_irq+0x56/0xe0 > [ 105.812113] worker_thread+0x4a3/0xc00 > [ 105.812823] kthread+0x31f/0x3b0 > [ 105.813537] ? rescuer_thread+0x720/0x720 > [ 105.814227] ? kthread_bind+0x30/0x30 > [ 105.814920] ret_from_fork+0x19/0x24 > [ 105.866663] ### dt-test ### EXPECT \ : GPIO line <> (line-B-input) hogged as input > [ 105.868134] ### dt-test ### EXPECT \ : GPIO line <> (line-A-input) hogged as input > [ 105.870372] GPIO line 509 (line-B-input) hogged as input > [ 105.872524] GPIO line 503 (line-A-input) hogged as input > [ 105.874446] ### dt-test ### EXPECT / : GPIO line <> (line-A-input) hogged as input > > # HH:MM RESULT GOOD BAD GOOD_BUT_DIRTY DIRTY_NOT_BAD > git bisect start d0edf98c01ebe0790295cf888a2976d2d04377b1 b9bbe6ed63b2b9f2c9ee5cbd0f2c946a2723f4ce -- > git bisect bad 4fde3f7c56e653e1d62102a4a77534f4bfec9689 # 07:04 B 0 17 33 0 Merge 'linux-review/Anson-Huang/ARM-dts-imx-Make-tempmon-node-as-child-of-anatop-node/20200520-230948' into devel-hourly-2020052107 > git bisect bad e8344c6f4e6b7a7318fa46dd6fd5418f3e36d010 # 07:04 B 0 17 33 0 Merge 'linux-review/Gabriel-Krisman-Bertazi/iscsi-Fix-deadlock-on-recovery-path-during-GFP_IO-reclaim/20200520-220836' into devel-hourly-2020052107 > git bisect good 6332b5a106b02909b3ac673832d1e36a901d81fa # 07:04 G 11 0 0 0 Merge 'stericsson/ux500-dts' into devel-hourly-2020052107 > git bisect bad 05c599fa08c02ea883075d05cc544f5e133dad15 # 07:04 B 0 11 27 0 Merge 'ras/edac-misc' into devel-hourly-2020052107 > git bisect good 25ef63dabd6b9567bd3d7870c5e8595b6b87c678 # 07:05 G 11 0 0 0 Merge 'linux-review/Maulik-Shah/arm64-dts-qcom-sc7180-Correct-the-pdc-interrupt-ranges/20200518-202257' into devel-hourly-2020052107 > git bisect good 0db2ae8dfea89b3541eb5ffb6e0aed13d921b277 # 07:05 G 11 0 0 0 Merge 'linux-review/Geert-Uytterhoeven/ARM-dts-r9a06g032-Correct-GIC-compatible-value-order/20200519-204708' into devel-hourly-2020052107 > git bisect good aeee233deb1c06fcf7630402c1f15208aa3d723a # 07:05 G 11 0 0 0 Merge 'linux-review/Lubomir-Rintel/media-marvell-ccic-Add-support-for-runtime-PM/20200521-053250' into devel-hourly-2020052107 > git bisect bad 6872daa8abed0e8bd8447d56cfca80c4d29d6243 # 07:05 B 0 10 27 1 Merge 'linux-review/Dinghao-Liu/i2c-imx-lpi2c-fix-runtime-pm-imbalance-on-error/20200521-033738' into devel-hourly-2020052107 > git bisect good f23da43a58d09dc6ea58837a45374e15de36537e # 07:05 G 10 0 0 1 Merge branch 'i2c/for-current' into i2c/for-next > git bisect good fadb47fca1f132c123395bca26c69007e816988f # 07:05 G 11 0 0 0 Merge branch 'i2c/for-5.8' into i2c/for-next > git bisect bad 4f118a7e4686062bd4df4a37e24c22cd71495b5f # 07:05 B 0 11 27 0 Merge tag 'for-5.8-i2c' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into i2c/for-5.8 > git bisect good c73178b93754edd8449dccd3faf05baafd4d3f0e # 07:05 G 11 0 0 0 i2c: tegra: Add support for the VI I2C on Tegra210 > git bisect good 6aab46bc52a8f579879d491c9d8062e03caa5c61 # 07:05 G 30 0 0 3 dt-binding: i2c: add bus-supply property > git bisect bad f89c326dcaa0cb8c3af7764e75eeed4e3f3c879a # 07:05 B 0 15 31 0 Merge branch 'i2c/for-current-fixed' into i2c/for-5.8 > git bisect bad 6fe12cdbcfe35ad4726a619a9546822d34fc934c # 07:05 B 0 15 45 0 i2c: core: support bus regulator controlling in adapter > # first bad commit: [6fe12cdbcfe35ad4726a619a9546822d34fc934c] i2c: core: support bus regulator controlling in adapter > git bisect good 6aab46bc52a8f579879d491c9d8062e03caa5c61 # 07:06 G 30 0 0 3 dt-binding: i2c: add bus-supply property > # extra tests with debug options > git bisect bad 6fe12cdbcfe35ad4726a619a9546822d34fc934c # 07:06 B 0 14 30 0 i2c: core: support bus regulator controlling in adapter > # extra tests on revert first bad commit > git bisect good 3788bb973ab542fcf623106a1cef5d8b1e237f7c # 07:56 G 10 0 0 0 Revert "i2c: core: support bus regulator controlling in adapter" > # good: [3788bb973ab542fcf623106a1cef5d8b1e237f7c] Revert "i2c: core: support bus regulator controlling in adapter" > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/lkp@lists.01.org