Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2464135rwr; Fri, 21 Apr 2023 09:11:27 -0700 (PDT) X-Google-Smtp-Source: AKy350a7xLccIIbUI3cSejzk8w04xsF6NNW5U5ABDcQml/11SDD9LQjgN6UClVUePJxp/T3ip1A1 X-Received: by 2002:a05:6a20:440d:b0:dd:dfe4:f06a with SMTP id ce13-20020a056a20440d00b000dddfe4f06amr6323895pzb.3.1682093487601; Fri, 21 Apr 2023 09:11:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682093487; cv=none; d=google.com; s=arc-20160816; b=rPzaoiLfEy7gEBWYJNEJqnTC7V+wteV0LCh3pwwSDPgzsePFG3LV3UMn9IkY+SHrk5 AYdT4tAe3TtXblwszDCdjBdcZp51uWdsXhboga8YRLTXP+/73f1bs9vBWhvVifSjMxPT dEhhPyKhDeg+Q7bB8yqC0+F2jKzcWhRoApZkPNYTfFn7JymFWpfnEDajEDdhyODSd9Go xjAAJMaC09yBib2rCVlVdyrxpKIQWt94vbBuY4oJtWu7uWCOfmxbKbcefc5nvZx7U9SW qa/qe7QEDCbtNLblTfb6OPrEhB8IrJX05e50ZHL53vh0Gemzr7rBvJhsqXAacO7QDVYN Q3UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=X0p9ZbhOXYKjYt5cWvF4EmtKKghfDT5LRpGuFxysBro=; b=BmMre+nhtn3CYjJQusL0rl6kfVZ7y/LQHkiSRkAj4XgzdjYVxJimLjWP003wmKb26w DBNBvDFwGPREgpJv+EiAG2E5t0eqNW3tw9mJtsC5yff0c+JBQZ47aw9ugQ1nwr0Zarlx IOBKrOFeqNCmFBVJeqAx/RvdMSYfc7NgbByY5ofpGYlqQ+0PoF8NWA7V6FcIV9GitZ0I P/H6pieU0ioggclkxh3AfAp4LUwAnw/4i09bsQQ0/tQvcRbbmrYKnVkGVj5zNdPPLP3Q IE0dEwoM58nlwNJIkw79pQ7ui9R9E/VIXtCpRVzswXgzP0BjKi2S9IlRnWjsBkWj0X19 /kiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j12-20020a170902da8c00b0019f33cb669asi5475968plx.615.2023.04.21.09.11.15; Fri, 21 Apr 2023 09:11:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232646AbjDUQCd (ORCPT + 99 others); Fri, 21 Apr 2023 12:02:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232592AbjDUQCb (ORCPT ); Fri, 21 Apr 2023 12:02:31 -0400 Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86C4AE61 for ; Fri, 21 Apr 2023 09:02:29 -0700 (PDT) Received: from fsav414.sakura.ne.jp (fsav414.sakura.ne.jp [133.242.250.113]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 33LG2BF6013975; Sat, 22 Apr 2023 01:02:11 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav414.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav414.sakura.ne.jp); Sat, 22 Apr 2023 01:02:11 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav414.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 33LG2BlB013971 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sat, 22 Apr 2023 01:02:11 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <0a23d945-0502-6330-d9ef-a6f8dd3a68e2@I-love.SAKURA.ne.jp> Date: Sat, 22 Apr 2023 01:02:09 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [syzbot] [kernel?] KCSAN: data-race in __fput / __tty_hangup (4) Content-Language: en-US From: Tetsuo Handa To: Dmitry Vyukov , syzbot , Greg Kroah-Hartman , Jiri Slaby Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com References: <00000000000013aaac05f9d44e7a@google.com> <6ff6fdea-c955-f9dd-289e-b0d613a28280@I-love.SAKURA.ne.jp> In-Reply-To: <6ff6fdea-c955-f9dd-289e-b0d613a28280@I-love.SAKURA.ne.jp> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/04/22 0:12, Tetsuo Handa wrote: > __fput(file) is called when the last reference to file is released. > Since __tty_hangup() traverses tty->tty_files under tty->files_lock, > tty_add_file() needs to hold a ref before adding to tty->tty_files > in order to defer concurrent __fput() by other threads? Hmm, this did not work; get_file() prevents tty_release().