Received: by 2002:a05:7208:31d3:b0:81:e143:7c29 with SMTP id v19csp432395rbd; Fri, 5 Apr 2024 08:41:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVOf2ALzW6VTZgSYJ2fxKgToZQzSDPcVWEDG3dsx+UOgV3DLlODkgR87a2/kT+EhI6G4+HJdqaShlAfw+4SdXFva4SxqAnseAmqsqj5Hg== X-Google-Smtp-Source: AGHT+IGKpBtiZ/XNdUITnFCwY2wvHmb3BSApxQsep6Z2SKMT3JhqZHfsvr8LONtstDXCxyr5VAn/ X-Received: by 2002:a81:6942:0:b0:615:1471:19b5 with SMTP id e63-20020a816942000000b00615147119b5mr1644627ywc.43.1712331704924; Fri, 05 Apr 2024 08:41:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712331704; cv=pass; d=google.com; s=arc-20160816; b=QILmYYdkRGyD18oWmCjSKyK1CJz0QNPMm7i9WExaTovrGmK2ZJ1RlOw7ttF4B9WFol hZCR+FjL3ZjFXf7fZuyzmjkBgfBtqjcZR3hFyloLfgBzvf5PDOqPP74ZlRUd2V2hEX9x eFrX5Fv2H+ZRrycItnGHs3aa/3/ns/GEVbti2tWdSpoXjPdP6xQRw4ECJM0kFCUtYvO+ Cge7KEUsrhhaLNnXHrdXmdqeAj9X0XYt8PhTmdP4vKAOYAEntZMU0+LV8q88PE+X6CN6 a98KO/9/W3e+zkrKdlXJ1akLA16YqmYC31AMGr84dv7QG28YACynd2zNw68Kgm8NmSky EH4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=tZ5Mwph3/XmYRqypIO/r8wSsIZPfEOkaYE7lglREnJo=; fh=4zQU1fh3xR2mZ/OiQlyUvspy1d1wgooXEHxGT1f2JwA=; b=Fosb+zHqpg0crKamO7f8Vmpz25iH/HQwDITErFWDV+VGHaLkBO0kpoOI9gJBXxxuLD SsOwra0GG2WI3h/F91YyIN0D8xgEQ292RVflH/mss+Ez561dbI4+iKR8g8pJW3kfBE8n //nf8vR+wlN5gcXOi9VurluK9dxDdAKlKAmfT7aKXQqfoqT8FIdsu4MMsV046GhhWO9Q zfuwckvNl4lrvG+EV/eIgZkveAnSMN088hGtz1pc1oa2XYH8Op0mLWKsw7d9Sc0JuBtr 7oJqiWyuZ+G5ShH/FC3DlliAUPWbq8bHSXficG5l+rvz/e41YymQXaWhLSdCgbHkDfey /NoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cIbe4UZc; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-133275-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133275-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p5-20020a05621415c500b00696b0e4b287si1960454qvz.477.2024.04.05.08.41.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 08:41:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133275-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cIbe4UZc; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-133275-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133275-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BB0FB1C21E23 for ; Fri, 5 Apr 2024 15:41:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C217616FF38; Fri, 5 Apr 2024 15:41:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cIbe4UZc" Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9425F4689; Fri, 5 Apr 2024 15:41:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712331695; cv=none; b=rL4J2vHKgpKsDoa6TwnZVrKbZuwMaStLe13jOD2vsRMhakRW3ncGUz2+AUx6rK8jYngp/mEzY/nVhc+ih6lsD/ozkaqdT4NtJgCHigTnJQYA7NuUxvdpAGVUPf6cG0j13S0Cn9IUXNxp3yHXMq42ZkS3Id6RcydylSKEj+SOEVw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712331695; c=relaxed/simple; bh=fjFv2oGljsYZ8RlUB2XmSpfbt8CKLn8bKBCjtdk8lZ8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Q/j1c/5wLjGanZgTiWa6qNMLVTIpMrlEwF4NiTVHTUYGH/RLawpTj6n/Gs5/CM/7DpuvC4GhF5cTUS6Kja+rtzUmfdCd32o/zhAirJsnfduKzMEuU+2kj+/9zeVWR3hKwY+2w+mM8OvsIrMbYR3JTdJayajkOfYwXtcr6uuRKaY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cIbe4UZc; arc=none smtp.client-ip=209.85.215.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-5cfd95130c6so1747687a12.1; Fri, 05 Apr 2024 08:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712331693; x=1712936493; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=tZ5Mwph3/XmYRqypIO/r8wSsIZPfEOkaYE7lglREnJo=; b=cIbe4UZcoD57IsRNUDKdHGwXUip+bwQu//hWtlZgjuodMLdqdicajRGTSfTHI9xcC3 zepVR/fK5SzaSrvE4I++rIipXUyZ2FhnkX3d0VKfe5FC+MghHcsf1/dxzDCatZbg5SRl kqqWtONiEf4PCFPl0qTQkOGRlsVXgtZczk3hl/vB5EUSi/FtgGuneyo1G7E7F2CpOD33 kf2xAWLJA2xk8mWo1FhwM26CpijYNz0yTTJlKju5SCslgRYBG7uUPolVXEwJHTc/SdRW AnGI70lzHf9PwAUv+jOVqhsuG1MFE/WVBbOqnsNfp5P1/xA8BrRdsWdhLvZHgdAkGot7 +Y9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712331693; x=1712936493; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tZ5Mwph3/XmYRqypIO/r8wSsIZPfEOkaYE7lglREnJo=; b=hVx4t6J85f9GXFbbUR6UrmDf3/hH2mMNnQooi8XsCK1fE3N49Qn6D6THYskPDTCia7 Kz5EoHLOr4T+45R8BnEFoDy7u5TEAvooVOYyx749brQXMD9a11fmDuhmTUQbJKg4p+Mt o5JRL0qyX3Gnsi2tTIsxYZxVPAqQne649LFVW2wu80KzsCG+gE/bvrmyI4jgJ2TAYw6S gmyrBaZo6au4EKKMlhE0ROR4c9n1ZA9rfwYNQyXWwE6Ui7jcCVIix+pbuvaAvypUaNA0 7LnMaHcWdxXiVSgqeJSUR77YMqjiFrXxNhUf+ayUi/41/o+lyqvGx6B6TegO6wtQd2D8 xNtA== X-Forwarded-Encrypted: i=1; AJvYcCUTVhvVbqUUT1d/eLXNxaBDKDVUsZ0bBoT+qDb5LU18NejVVObxCTUuXuRLhGl+XXZ0okCcLHkZv9FpFTglwf4FSNXr4/aa4fnURZEzqUxcsOE0vSOlCJ8oiDfbuwopR/5RYYJsEuwI7X6t7A== X-Gm-Message-State: AOJu0YxHEtOJlHmI3QKd3RpFVIIzXOxl2sm1gURu+Pv90z7eAdYQWexi waGsFkYMU0O6nZOkYKCkVsmKOyetcIzhmaEaDZsT6Yh2naBdyNxg X-Received: by 2002:a17:90b:4414:b0:2a3:be59:e969 with SMTP id hx20-20020a17090b441400b002a3be59e969mr1447018pjb.47.1712331692857; Fri, 05 Apr 2024 08:41:32 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:25ab]) by smtp.gmail.com with ESMTPSA id d18-20020a17090ac25200b002a219f8079fsm1656244pjx.33.2024.04.05.08.41.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 08:41:32 -0700 (PDT) Sender: Tejun Heo Date: Fri, 5 Apr 2024 05:41:30 -1000 From: Tejun Heo To: Christoph Hellwig Cc: Amir Goldstein , Al Viro , syzbot , gregkh@linuxfoundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, valesini@yandex-team.ru, Christian Brauner , Jan Kara , Miklos Szeredi Subject: Re: [syzbot] [kernfs?] possible deadlock in kernfs_fop_llseek Message-ID: References: <00000000000098f75506153551a1@google.com> <0000000000002f2066061539e54b@google.com> <20240404081122.GQ538574@ZenIV> <20240404082110.GR538574@ZenIV> <20240405065135.GA3959@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240405065135.GA3959@lst.de> Hello, On Fri, Apr 05, 2024 at 08:51:35AM +0200, Christoph Hellwig wrote: > On Thu, Apr 04, 2024 at 12:33:40PM +0300, Amir Goldstein wrote: > > I don't follow what you are saying. > > Which code is in non-starter violation? > > kernfs for calling lookup_bdev() with internal of->mutex held? > > That is a huge problem, and has been causing endless annoying lockdep > chains in the block layer for us. If we have some way to kill this > the whole block layer would benefit. of->mutex is mostly there as a convenience to kernfs (here, sysfs) users so that they don't have to worry about concurrent invocation of the callbacks. It needs more careful look but on cursory observation, it shouldn't be difficult to implement a flag or different op type which skips of->mutex if this causes a lot of pain. Thanks. -- tejun