Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2664763imm; Sun, 12 Aug 2018 20:44:11 -0700 (PDT) X-Google-Smtp-Source: AA+uWPy2tjoC79xaPKRtwbveqS88c1o7bsDVa/BA04UQ/4JjIkqgLFFrP7D0OM6qFIwQ/neF1gRG X-Received: by 2002:a63:2106:: with SMTP id h6-v6mr15350607pgh.161.1534131851633; Sun, 12 Aug 2018 20:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534131851; cv=none; d=google.com; s=arc-20160816; b=muF53FHwMTysw2EM0z7qW83qpCI+SrYGdmm7dLZnjUH5exBYiMlpliWJG0drEo6uQH +d351zjkUoqO16xyxNoPIEXBEQp55Lfu83OVxohCbYcZDM84RNtpciV+faZt3yTur7fu M3Spe3Szu8ebg75ZdbErtm2n9BugNkzBLoe9AXCUa4qm+xZJa0ALxIxmAdvn5eTauyph jPjnPCdgHEg+mZAAN3NXsQVCTwR+KP0d8ClMMccjY7IueFB4rc8bb0sqeH9vlNUjxWt6 CPylQcijsLSK+zhFfg7O5mva/6qeKq86HSWuumcAViMgkx2GmPPiw1OI+66eaG2JudlG rpKg== 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=L+T3hRbA3G+EAVL45olDMU1Uft90dhRV3PfkXKItexE=; b=wDA1leTinbKhk8G/MJ7pOhhc50yzNBOBu78A/uXQ1zQvonNwuiIdM3VICCS5xHEGVQ BfdxH+bRrzKxLa8wd1TSEiMtvH7IIapiS7WtSopnZuapOUJId8Lub6bX/PXdLzO/3WwC j0JETvR1+gCPG8+04ynem+Hjvz5dwgtcUkf3W3rLQAeMsKHyt7VjCt2Hq89v97hoM7bY 0qDo8IY/SuxrJvwCM7sypES350MGQyHHqb2vq5jNv6H26q5SdoBOTpubP7pXwB6OUrTd qUT6C/MoDP1IoZMkiAXR7VUEj5Z6fe//ko7yBe77gbD4OK7y3487qs8GcLhiup4welEa pjMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lWxGyOPG; 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 u129-v6si17900662pfb.247.2018.08.12.20.43.57; Sun, 12 Aug 2018 20:44:11 -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=lWxGyOPG; 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 S1728029AbeHMGX2 (ORCPT + 99 others); Mon, 13 Aug 2018 02:23:28 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:38017 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725896AbeHMGX2 (ORCPT ); Mon, 13 Aug 2018 02:23:28 -0400 Received: by mail-pl0-f66.google.com with SMTP id u11-v6so6347194plq.5; Sun, 12 Aug 2018 20:43:08 -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=L+T3hRbA3G+EAVL45olDMU1Uft90dhRV3PfkXKItexE=; b=lWxGyOPGXH8YKAHyhWAWcAtTFJOn0r2iVTm+kaNOfWaCxl6omvGs2o3GWgv3ny4OpZ BZrcbJncjwh6grYtTVSjpNE97MlW4u9QMBFQHkfWyMRTXU0MxfDM1ABoNDGn++sPXVn/ VE3ZlS1B6mDKR6JLgzKIUhE6ZMDQquG2o44Td7eo9s2pq6LnYOIV64P91S1brygaxLjo s39EQbWZ2XSuIC2MaTjsaNNaykaC9JJtMOKs01k7+ZqdSytTjkuCtb96F8SqS4xuOnpD D5yYfGknKItX3gu4AexraRKa8uj4nGvtCJ13QUfuY28wzKr2KPkKVofUj/1fDv+njeHi JVvQ== 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=L+T3hRbA3G+EAVL45olDMU1Uft90dhRV3PfkXKItexE=; b=oHQn/1e9Kr72MtHWW47YaLDaoJRLYFdW2+Y93ojoWdkRg8BAuy2xpkdL53+dLT9WUo yDlTaU0KU2cyMM83Cjh2sCM9t88iVETKX9I96YsIkaWfB5QbLdohrgd9vSPQ8quXkTZb xo2FPATdZ9xfTwNtMF7FR8tviThKFLalaZQboGX5leIkKNuf0ela2hc1kj6+FI9wrJVX kNNtqEbv0bonK6nNPaxaIqsDi2hYwoqkKCeS9G9ik8hBJqM9tbD1xRcaHgxqEdPPr9oq LIzWB4GfRzX2iKjtmrpKJY7/j12KMNmXjZKRmywoIPBaL64sOHg+pK6nzaJErqKMgIqX QKMg== X-Gm-Message-State: AOUpUlGvFKT4/UweFCflkUt8LJL3p2Exg/ivORyjejhq1Ks7PvBauF5q sSZUvAdaleUdubcNM2P/fxv5knUF X-Received: by 2002:a17:902:820a:: with SMTP id x10-v6mr15167355pln.261.1534131788174; Sun, 12 Aug 2018 20:43:08 -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 z2-v6sm15008669pgv.12.2018.08.12.20.43.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Aug 2018 20:43:07 -0700 (PDT) To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org, Linux Kernel Mailing List From: Jia-Ju Bai Subject: [BUG] fs: nfs: callback_proc: a possible sleep-in-atomic-context bug in nfs4_callback_sequence() Message-ID: Date: Mon, 13 Aug 2018 11:43:04 +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 fs/nfs/nfs4session.c, 223: schedule_timeout in nfs4_slot_wait_on_seqid fs/nfs/callback_proc.c, 466: nfs4_slot_wait_on_seqid in referring_call_exists fs/nfs/callback_proc.c, 544: referring_call_exists in nfs4_callback_sequence fs/nfs/callback_proc.c, 504: spin_lock in nfs4_callback_sequence 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