Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1163445imm; Wed, 1 Aug 2018 11:13:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcbvbu7qf5m29FWvHXfJ4+EBTdFR1h5tpW92Nyx7bpfibZnRqJ+3/tos+h+EGMpaDU03z2O X-Received: by 2002:a17:902:24e:: with SMTP id 72-v6mr25542428plc.74.1533147233462; Wed, 01 Aug 2018 11:13:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533147233; cv=none; d=google.com; s=arc-20160816; b=Aeo/qHU3H4Hzb40JNYffueKqAS8GZLnZiOnyn1pfbX7h/njRwtN0321+FMm+mg10U0 eCQCMlVbq6SahJw2TmrDvzJHSmEYVuZdmdR6M7sVv12QdlLzypjHeHXlYrX2D06eQA/J nbl3BTZSieIW6UIZ7mekru5fsQPLJdNJnd9eTqW/0CrdPOxMMcZRx+e56EAmHIbUA39z lkwp1/K5theBtZKxa/QjdLqtGRCn7U6fbOSJ3m9pT6lIdL9aai17u8+WkI/nlgyArryN qxaeOconBt2CFy+DbMPuc26iOg5MulAmqO/UfdizhMojcxGIqCiW2P5kWOwANR15NuCZ q/cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=veIbTakvxYZvH2dt8oQJPV0DE9D9ckuTed0P1T/sc2o=; b=P8Kp73fKkYf5xt7damaBVzsyAlccQoPFZBmxu4D/7BjxqZsdYNen+cs8JTrJERQ7OK CpodRo9wvPjVHgmoRVyvOP+Dd/cQmRFYsvtX3s3VcsgP8lZJ7tZvaY9VNrnCWhsX66M9 nzijfkIwCjNl17qNWwBaPrLPcsm1zGqo8ysQMwqPMEqoONxBzSIAf8TGjVTKjUDPeN3s UQ09FYX+B/hFKkWW8Zpmq88r28ixAt6JWUMbYh+0KWb9Lz5muaLoxwfY6Oe8KnhD9o1i +doK+1CRY0uXl4fDTwOkVdhJ/SYV0asyxWrRpxS1qLlL5S/xyDOMk/sDnGKlKQngFNau e7XA== ARC-Authentication-Results: i=1; mx.google.com; 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 n14-v6si4176822plp.231.2018.08.01.11.13.39; Wed, 01 Aug 2018 11:13:53 -0700 (PDT) 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; 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 S1732162AbeHAT7O (ORCPT + 99 others); Wed, 1 Aug 2018 15:59:14 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49924 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405701AbeHATIf (ORCPT ); Wed, 1 Aug 2018 15:08:35 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 302EF13B9; Wed, 1 Aug 2018 17:15:27 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thierry Escande , Marcel Holtmann , Sasha Levin Subject: [PATCH 4.14 073/246] Bluetooth: hci_qca: Fix "Sleep inside atomic section" warning Date: Wed, 1 Aug 2018 18:49:43 +0200 Message-Id: <20180801165015.204372917@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thierry Escande [ Upstream commit 9960521c44a5d828f29636ceac0600603ecbddbf ] This patch fixes the following warning during boot: do not call blocking ops when !TASK_RUNNING; state=1 set at [<(ptrval)>] qca_setup+0x194/0x750 [hci_uart] WARNING: CPU: 2 PID: 1878 at kernel/sched/core.c:6135 __might_sleep+0x7c/0x88 In qca_set_baudrate(), the current task state is set to TASK_UNINTERRUPTIBLE before going to sleep for 300ms. It was then restored to TASK_INTERRUPTIBLE. This patch sets the current task state back to TASK_RUNNING instead. Signed-off-by: Thierry Escande Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/bluetooth/hci_qca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -881,7 +881,7 @@ static int qca_set_baudrate(struct hci_d */ set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(msecs_to_jiffies(BAUDRATE_SETTLE_TIMEOUT_MS)); - set_current_state(TASK_INTERRUPTIBLE); + set_current_state(TASK_RUNNING); return 0; }