Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2642211imm; Sun, 12 Aug 2018 20:05:53 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwk357SNmURGzNG/ARkYc0MF4nU2boW3Qc/FDpsT8Lz5gJOgZvnaUEoVsXR7gGCDvNkJneV X-Received: by 2002:a62:8d16:: with SMTP id z22-v6mr17301587pfd.181.1534129553607; Sun, 12 Aug 2018 20:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534129553; cv=none; d=google.com; s=arc-20160816; b=sQhwfqeG01zml0sko8HVt7hLRvNZaeHbM/Q6v09yjEBWG/9i3dhUg+7zc7MZ+Gn/fA +bO1udXIZaE8CjGiHlHw3WRjNKVdD6YbyCWEV0uJ0fCxPnGS19R0PwP8prh9KevREgRQ Sx0qYhA/euM+FTUNTgWdCJpUQigUpbdycXhdO1D+6V5q0GLzjWzaxTL5XmwfzLhAxg5X 2BtJv8xPtg8IbetSwphIlnLsuLG2jMDUVOGmNBRudxkiFrTRD2ef1vAgT4fEBYXghugu +KfvU9IWbncbtyMTmXFotLJxhFZfDSgxApCbHLZfvgBiSBtmoDTjC+jxpBKTh5oI3lsk f0ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:mime-version:user-agent:date:message-id :subject:from:cc:to:dkim-signature:arc-authentication-results; bh=TwpSUGuGFDFkxibKJ3TSKJ5JM4XI0YwfNEnufeR4F7U=; b=EoBQAqVtAzyf3uaC4qP3i2obMXwpYiaqkqU4BaSS0ZrtbNJck+cYoVKpc1wifQ/KJ1 9RbTJM2Nzel6Cod0ZoOPFC1zW1zNML4QYz90RDAlGz/imKlmG9K/IAD5/p760wz8R+sf gqWgZGoedAymPEeQWg/nbcUcqUB/NOH2yLZKYCOXFxXYgXvPxcJF5J1UTgCM/fFcACmp oNzsfBx1eAO3BaYPVPNk7d34i9tlFNmfK0D/FlLUm57+k/7K6pWmrt3NhvQsrRsHc6FA 3tJEAhz8h86XxT6XpgeLsgc/aDX0Mvu6cofIXaY0HNv2faya4o+h3hhJxTOy/svpe+/y bzSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AX1ZFHGP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 192-v6si18590747pfa.81.2018.08.12.20.05.38; Sun, 12 Aug 2018 20:05: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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AX1ZFHGP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727114AbeHMFo1 (ORCPT + 99 others); Mon, 13 Aug 2018 01:44:27 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44675 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725849AbeHMFo1 (ORCPT ); Mon, 13 Aug 2018 01:44:27 -0400 Received: by mail-pf1-f193.google.com with SMTP id k21-v6so7003671pff.11 for ; Sun, 12 Aug 2018 20:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=TwpSUGuGFDFkxibKJ3TSKJ5JM4XI0YwfNEnufeR4F7U=; b=AX1ZFHGPnxX/VWPPAt6m3wEglTTzhI0U012I9GGKa03jbnqNBiNGS+bJRIz82Rajha Ww8V47T+hvkQqGMtVnhbfAEwDlAzziKjHv5g7TMzs5YIyGWCZe9xj/9HH/33YJBMlsQw oCXwx+gIIqD05EzwBAljmo5A1g4x2ZCPRbFgNG1j3QTeK6ELKAiLreGFgJj5v2asXo8R d6195ziXWVtMj0/VSrMrumW8WB70uo3RfJGnOrS/l8eg6ULdrNMVq6Qrhr2rgnMcV5AS 4AjfQQ7uTygxD1vHFzlOwZiOrxcan7fpWlvJyDS7d1MisZI6VtGpy+bZ8cQOnBKIk8w5 zE1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=TwpSUGuGFDFkxibKJ3TSKJ5JM4XI0YwfNEnufeR4F7U=; b=kNXX3Ixy7Iemi6fnASlj0bIRKbfYp4/4PrGrwHnV5I6H4v1blGdS8DgXsyWBCvUyss DO1FmquJVPEyQ0Mg7Ej6vhgvV6itFiSrjD/8wQ80zxROS7X6v9D+2q0p9mTcBvXG6G4n x9qb7WGKS7WN4ss9zoqEYa97YSWO/nA4WGR+uSffR94uHb2GeUksieY/gF7p+SleoSFU 1k4zSqTfEkuCehzJD83V+M/azCAQHbjzQ9Ag/8S7EZ7/EGAXdqzp/1YGgeEubyhlonov 3uBF2+7hWb6DJWrPK/dwPNqQOHsWLWpzdfsSBaZS9togiQJM+qSVahzh+HL6nyRXj8GT ofuA== X-Gm-Message-State: AOUpUlELCTIcbUn9yGGFj1rEDRkES9uhmNj23yt5qen75WFb6W2FtY49 8QkIgY3eDyKw8i0qqBdfLqMq5fll X-Received: by 2002:a65:5b8e:: with SMTP id i14-v6mr15497646pgr.242.1534129455254; Sun, 12 Aug 2018 20:04:15 -0700 (PDT) Received: from ?IPv6:2402:f000:1:1501:200:5efe:166.111.71.57? ([2402:f000:1:1501:200:5efe:a66f:4739]) by smtp.gmail.com with ESMTPSA id h130-v6sm56982170pgc.88.2018.08.12.20.04.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Aug 2018 20:04:14 -0700 (PDT) To: dave@stgolabs.net, paulmck@linux.vnet.ibm.com, josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com Cc: Linux Kernel Mailing List From: Jia-Ju Bai Subject: [BUG] kernel: rcu: a possible sleep-in-atomic-context bug in srcu_read_delay() Message-ID: <4179b4d2-b832-abcd-d407-b865765f28d6@gmail.com> Date: Mon, 13 Aug 2018 11:04:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The kernel may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.16 are: [FUNC] schedule_timeout_interruptible kernel/rcu/rcutorture.c, 523: schedule_timeout_interruptible in srcu_read_delay kernel/rcu/rcutorture.c, 1105: [FUNC_PTR]srcu_read_delay in rcu_torture_timer kernel/rcu/rcutorture.c, 1104: spin_lock in rcu_torture_timer Note that [FUNC_PTR] means a function pointer call is used. I do not find a good way to fix, so I only report. This is found by my static analysis tool (DSAC). Thanks, Jia-Ju Bai