From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99397C43381 for ; Fri, 15 Mar 2019 18:12:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7297C218AC for ; Fri, 15 Mar 2019 18:12:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726078AbfCOSMk convert rfc822-to-8bit (ORCPT ); Fri, 15 Mar 2019 14:12:40 -0400 Received: from mgw-02.mpynet.fi ([82.197.21.91]:47886 "EHLO mgw-02.mpynet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbfCOSMj (ORCPT ); Fri, 15 Mar 2019 14:12:39 -0400 X-Greylist: delayed 417 seconds by postgrey-1.27 at vger.kernel.org; Fri, 15 Mar 2019 14:12:37 EDT Received: from pps.filterd (mgw-02.mpynet.fi [127.0.0.1]) by mgw-02.mpynet.fi (8.16.0.27/8.16.0.27) with SMTP id x2FI4dgP045775; Fri, 15 Mar 2019 20:05:28 +0200 Received: from ex13.tuxera.com (ex13.tuxera.com [178.16.184.72]) by mgw-02.mpynet.fi with ESMTP id 2r421yg1u7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 15 Mar 2019 20:05:28 +0200 Received: from lettuce (86.115.14.69) by tuxera-exch.ad.tuxera.com (10.20.48.11) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 15 Mar 2019 20:05:28 +0200 Date: Fri, 15 Mar 2019 20:05:26 +0200 From: Emil Karlson To: , Sasha Levin , Subject: Request to add fs/9p: use fscache mutex rather than spinlock to 4.4 stable Message-ID: <20190315200526.27503fdd@lettuce> Organization: Tuxera X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Originating-IP: [86.115.14.69] X-ClientProxiedBy: tuxera-exch.ad.tuxera.com (10.20.48.11) To tuxera-exch.ad.tuxera.com (10.20.48.11) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-15_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=9 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=880 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903150124 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Greetings We are seeing BUGs like this in our test setup (with appropriate debugging options on): [ 164.402581] BUG: sleeping function called from invalid context at ../include/linux/wait.h:1095 [ 164.404409] in_atomic(): 1, irqs_disabled(): 0, pid: 3083, name: cp [ 164.405651] 3 locks held by cp/3083: [ 164.406467] #0: (sb_writers#6){......}, at: [] __sb_start_write+0x9e/0xd0 [ 164.408213] #1: (&type->i_mutex_dir_key#7){......}, at: [] path_openat+0xb22/0x4090 [ 164.410329] #2: (&(&v9inode->fscache_lock)->rlock){......}, at: [] v9fs_cache_inode_set_cookie+0x53/0x160 [9p] [ 164.412738] CPU: 1 PID: 3083 Comm: cp Tainted: G O 4.4.176 #1-NixOS [ 164.414119] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014 [ 164.416351] 0000000000000447 ffff88004deef7f8 ffffffff818dc664 ffff88004dee8000 [ 164.417850] ffff88004fc22fd0 ffff88004deef820 ffffffff811bb49f ffff88004fc22a80 [ 164.419378] ffff88004fc22a80 ffffffffc0141940 ffff88004deef860 ffffffff811bb605 [ 164.420976] Call Trace: [ 164.421541] [] dump_stack+0x63/0x8f [ 164.422551] [] ___might_sleep+0x1ef/0x2c0 [ 164.423609] [] __might_sleep+0x95/0x1a0 [ 164.424705] [] __fscache_disable_cookie+0xa8/0x4c0 [fscache] [ 164.426101] [] __fscache_relinquish_cookie+0x63/0x3d0 [fscache] [ 164.427623] [] v9fs_cache_inode_set_cookie+0xb0/0x160 [9p] [ 164.429093] [] v9fs_vfs_atomic_open_dotl+0x7de/0xac0 [9p] [ 164.430477] [] ? v9fs_inode_from_fid_dotl+0x220/0x220 [9p] [ 164.431869] [] ? security_capable+0x7a/0xb0 [ 164.433058] [] ? privileged_wrt_inode_uidgid+0x7a/0xa0 [ 164.434371] [] ? capable_wrt_inode_uidgid+0x84/0xb0 [ 164.435600] [] ? generic_permission+0x261/0x320 [ 164.436784] [] ? __inode_permission+0xb3/0x240 [ 164.438050] [] path_openat+0x1920/0x4090 [ 164.439150] [] ? path_mountpoint+0x7e0/0x7e0 [ 164.440416] [] ? deactivate_slab+0x17f/0x4c0 [ 164.441511] [] ? deactivate_slab+0x369/0x4c0 [ 164.442586] [] ? _raw_spin_unlock+0x27/0x40 [ 164.443733] [] ? deactivate_slab+0x369/0x4c0 [ 164.444867] [] do_filp_open+0x170/0x240 [ 164.445867] [] ? user_path_mountpoint_at+0x40/0x40 [ 164.447107] [] ? _raw_spin_unlock+0x27/0x40 [ 164.448198] [] ? __alloc_fd+0x17b/0x410 [ 164.449220] [] ? kmem_cache_alloc+0xc0/0x1f0 [ 164.450354] [] do_sys_open+0x22d/0x3a0 [ 164.451386] [] ? filp_open+0x60/0x60 [ 164.452353] [] ? lockdep_sys_exit_thunk+0x12/0x14 [ 164.453511] [] SyS_openat+0x14/0x20 [ 164.454492] [] entry_SYSCALL_64_fastpath+0x1e/0x9a Applying the obvious patch 8f5fed1e917588f946ad8882bd47a4093db0ff4c on top of linux-4.4.176 #1-NixOS makes the issue disappear. Would it be possible to add this patch to linux-4.4 stable tree? Best Regards -Emil -- Emil Karlson Senior software engineer e. jkarlson@tuxera.com t. +358-44-040-7831 a. Westendintie 1, 02160 Espoo, Finland w. www.tuxera.com Tuxera. Make it work.