Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1273854lqm; Thu, 2 May 2024 09:43:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXiY9YPs+J7/4R4cVYXYxIeZNzAjfB1PadpmH06/sk/qjjeTt4wUo3YWEPDlvjxOdBG/KPeJ1CzWf4yjRgWqm/1aMhBg3ZuzYalkgoTYA== X-Google-Smtp-Source: AGHT+IEsBJxC56AOlC81bBZAlD/6SAyLthddSClvvwzYmzna7ezK3uFHwIQyVg7a5QhVbcgAxBMf X-Received: by 2002:a50:f60f:0:b0:572:6ee9:5a2d with SMTP id c15-20020a50f60f000000b005726ee95a2dmr7386edn.12.1714668200716; Thu, 02 May 2024 09:43:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714668200; cv=pass; d=google.com; s=arc-20160816; b=aebyKnCpQvNE07x/mIXyWkgOveTrcP1blB4ABbPrHaNQIAwhzcJmf/TDlpqRDW6fvp jIMmL80yd+gFchbtpjhd+ZhaAZYBi+PHSe5yquLjoiuo2IlAZANMWVwaxtat/lK6YtyG ZWu4464LZ+a9IVIWtmbcvPvXlGrxonh2X/k2T3Zny37dXYLeIe+FIitj+7xSm5RqDVfO Lw+WK/yuaK93cDhYFhUpmAG7oS4nvUbxrQV/J2Yd3YqqTxIYamWG3H9Zx71rPFemljPI +NoSq4zIcPQHw1bnzZR9gRXBK3PEXhNujWfeCJVsKDIzTtMgsMes1s6LlSmcmQGlYaKI x3lg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=loqP9r/ve452BsM3v6If+DoXVpPyOR1wcf8x2J+xGlc=; fh=T/wNWvlChZ+Ba++5FzV2f5fPI4tqNM+GA+uQCgO2vN0=; b=DdK5jR6sq2imFypfvB/EUwip7T19aemYYnbnpSnlIzMbBeIVCEtlj8B5ADaNLqxXnr o38UBnUjOJmgPhHeYqA66ICCeskg3FW1qV6FXMWEhHpV6xd9IKScdJuVg4MgXyZjj9KF CRQwEVGnLoME0VI3xP7iEJmuQGWDm6KVM3k29QUUuPphayYwe9FeZ1eZXIo7VVArVmAp wc4P6Q+VDbZS8QbIvvNMay7DkxrnaTwPhsdV4CSoNsM3ZGtVfBLWpKGuR2huw6qihG3Q Wao8jBha/5b0Ios4CtOesJMh+1naE3nWxzEmUDPRN0uHecXOk6xUaapi5bfQS8FnM4oa vHxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=i-love.sakura.ne.jp); spf=pass (google.com: domain of linux-kernel+bounces-166741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166741-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id o17-20020a056402039100b00572ac79d6a1si638828edv.403.2024.05.02.09.43.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 09:43:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=i-love.sakura.ne.jp); spf=pass (google.com: domain of linux-kernel+bounces-166741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166741-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5C9DF1F22120 for ; Thu, 2 May 2024 16:43:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83ADA16D31C; Thu, 2 May 2024 16:43:07 +0000 (UTC) Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3FF428FC for ; Thu, 2 May 2024 16:43:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.181.97.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714668187; cv=none; b=tpTpPjd3ek/PaMsRRBQWugzCPMvtnjGcPpx7zDyljf/1dBdZW1WzTgRXsAR8AQ6NzmJ9ixsuyDnd5gcxbdPYU40hEN5eCT1MdTgSe8is5DAWKWdQl3BggQU9IWIQQwF0iDhe0qQmtYh/KUtnCL5ff+IexwUkMKd0Oz2hxFjZ/KI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714668187; c=relaxed/simple; bh=nDCteMAo7TB7jOqFNL8Pl2VdYrsWy9L3aMTAc4Aka7I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VSJiVOBdVj9mZNxuj2MTAXeQb5q394MKjFcZpBtaRbgOFTv2sdNOsFkmhfmLVGn6yK/VPZFiZpJcW89AjkK8yD8Erhifoae1RJtgz7qGtsUGNPfxrTbLRxWOxsB+e55RiVRBCZFhuF+2kqz6jWO98eiPQZyZ5YkahK16lKZAYKs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp; arc=none smtp.client-ip=202.181.97.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp Received: from fsav116.sakura.ne.jp (fsav116.sakura.ne.jp [27.133.134.243]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 442GgFuK015746; Fri, 3 May 2024 01:42:15 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav116.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav116.sakura.ne.jp); Fri, 03 May 2024 01:42:15 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav116.sakura.ne.jp) Received: from [192.168.1.6] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 442GgFtk015742 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 May 2024 01:42:15 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: Date: Fri, 3 May 2024 01:42:12 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] tty: tty_io: remove hung_up_tty_fops To: Marco Elver , Linus Torvalds Cc: paulmck@kernel.org, Greg Kroah-Hartman , Dmitry Vyukov , syzbot , linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, Nathan Chancellor , Arnd Bergmann , Al Viro , Jiri Slaby References: <8edbd558-a05f-c775-4d0c-09367e688682@I-love.SAKURA.ne.jp> <2023053048-saved-undated-9adf@gregkh> <18a58415-4aa9-4cba-97d2-b70384407313@I-love.SAKURA.ne.jp> <892324fc-9b75-4e8a-b3b6-cf3c5b4c3506@paulmck-laptop> Content-Language: en-US From: Tetsuo Handa In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024/05/02 23:14, Marco Elver wrote: > I sent a patch to add the type qualifier - in a simple test I added it > does what we want: > https://lore.kernel.org/all/20240502141242.2765090-1-elver@google.com/T/#u Want some updates to Documentation/process/volatile-considered-harmful.rst because __data_racy is for patches to add volatile variables ? Patches to remove volatile variables are generally welcome - as long as they come with a justification which shows that the concurrency issues have been properly thought through. > > I'll leave it to Tetsuo to amend the original patch if __data_racy makes sense. OK if below change is acceptable. --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1012,7 +1012,7 @@ struct file { struct file_ra_state f_ra; struct path f_path; struct inode *f_inode; /* cached value */ - const struct file_operations *f_op; + const __data_racy struct file_operations *f_op; u64 f_version; #ifdef CONFIG_SECURITY Hmm, debugfs assumes that f_op does not change? fs/debugfs/file.c: In function 'full_proxy_release': fs/debugfs/file.c:357:45: warning: initialization discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers] const struct file_operations *proxy_fops = filp->f_op; ^~~~