Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3840767ybx; Mon, 4 Nov 2019 03:48:14 -0800 (PST) X-Received: by 2002:a17:906:3b06:: with SMTP id g6mr1586836ejf.20.1572868064853; Mon, 04 Nov 2019 03:47:44 -0800 (PST) X-Google-Smtp-Source: APXvYqxmN6VX99I5eHH92hDpsMnnbJ3wdy7imdGxNg2wdAEKlS6Nu8wDGwQzhC4DyTdbgO+iJ5vM X-Received: by 2002:a17:906:3b06:: with SMTP id g6mr1586736ejf.20.1572868064062; Mon, 04 Nov 2019 03:47:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572868064; cv=none; d=google.com; s=arc-20160816; b=fQqqErZeH1yLLEkAxUl44PMdpkJ39a64E3U4j9LhtwylJSE4Ul8JAXpK8DcHFHmucC HU+lsTVbGWspwN7QkKD8UmO9HyfhTITbHBxs5MLLAzaiyQsPaZ1wI4kEjzmbYnXCQn2a 0cFRUm82QEfCHZpCJcO89G4aIwOR8BMULJET9UnUbbZDx8yJPmSdJVd3xG6ySpn/Ekf+ 2BC2b+wcRO0gZHfgEmSRxvEnVr1Bn0ouIt2XpjW5mfcZxPE2oxA+k5/iMOEpXKrOaq2J gQPpDWV2gCqbbGYy84FvHxaqmvWXN0v09OqU/2rzbDjOG/TlK/0Mm7gaD1dlDWJM2CuJ SqRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:from:subject:message-id:date :mime-version; bh=6/ZpXaM+qq6hszn51R5GJMju7VQebT1P49v6AbLTouM=; b=hYLWHejE9T7fwNnJYjHLaw4KGygptZzjL2ZEV4+9R7YiiYLJq4DJHMOPZJbFePR1mF gTE7LpLuGPrPJ/cHgmSBHnG4+evL/5XKDri8KM9sDgqPG9QriyzFWPKihLve8IVku5eM cjOAKoF2OOyIdBOG59uOjCJ2TQbXFJLNh4T2VYWdftUTzox7/H12WUYT0+MVoZmkxz97 wNbW1XRomP5IlBE3E42YCCIsjj9ewbAJpFks2gmEBf1MQeNdopPNAOrE1rFl/K1g1QOI FRdS9MODiTb8odwIP/5TgCoD/z4wktnxPJ5ZQNmwOhfcdEJyu5daVWWH9IIcxirQ/Vhx OS5w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o17si2057518ejr.153.2019.11.04.03.47.19; Mon, 04 Nov 2019 03:47:44 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728715AbfKDLoL (ORCPT + 99 others); Mon, 4 Nov 2019 06:44:11 -0500 Received: from mail-io1-f71.google.com ([209.85.166.71]:55313 "EHLO mail-io1-f71.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726441AbfKDLoL (ORCPT ); Mon, 4 Nov 2019 06:44:11 -0500 Received: by mail-io1-f71.google.com with SMTP id c67so12879518iof.22 for ; Mon, 04 Nov 2019 03:44:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=6/ZpXaM+qq6hszn51R5GJMju7VQebT1P49v6AbLTouM=; b=pOCQTOuLudXBZvAX1IifRnMcl/9ol0h9SPCPOiBt6gh9o4rJWxZluU8/dXTtK7Cumk zClV7Xp3a9ejPrhFqtSJ6nBkTeIcPrNn1ubUyGB2DUCdNI8K9d5RcuDrLaF32cwDqJX3 CKEPEHi5dfDRp9DXdZnxGqk1OFRLfr0cEIbVCi3LbPWCeO693Degrrmt8PDCG/22Hj7i Y9+xKXA3JMxB1BKSOZ0+EF0HmHeXYP0BXXr3D6l3JTnza7mt1sG/ctYSlYMtUjeYIqEy BYEfYSyqByrQxqEbj6ECKwB3Q6PYnPINhdVGCsl14X+NoeDAkATbovbJn3CaY8HtN3JU VAPw== X-Gm-Message-State: APjAAAV644/5XO3VhWLNli2XCYKjWXxeJqHGwmM+XQyC90qPy8f6pe8H 6fl+OCTsmghglIkLpx16wXqw7hea+cyimOcScqLAWQ5u31k8 MIME-Version: 1.0 X-Received: by 2002:a5d:9385:: with SMTP id c5mr23968738iol.197.1572867848829; Mon, 04 Nov 2019 03:44:08 -0800 (PST) Date: Mon, 04 Nov 2019 03:44:08 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <0000000000006881cf059683d5fb@google.com> Subject: KCSAN: data-race in echo_char / n_tty_receive_buf_common From: syzbot To: elver@google.com, gregkh@linuxfoundation.org, jslaby@suse.com, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following crash on: HEAD commit: 05f22368 x86, kcsan: Enable KCSAN for x86 git tree: https://github.com/google/ktsan.git kcsan console output: https://syzkaller.appspot.com/x/log.txt?x=106bdb60e00000 kernel config: https://syzkaller.appspot.com/x/.config?x=87d111955f40591f dashboard link: https://syzkaller.appspot.com/bug?extid=e518b0df8f4e19495d3e compiler: gcc (GCC) 9.0.0 20181231 (experimental) Unfortunately, I don't have any reproducer for this crash yet. IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+e518b0df8f4e19495d3e@syzkaller.appspotmail.com ================================================================== BUG: KCSAN: data-race in echo_char / n_tty_receive_buf_common write to 0xffffc9000c433018 of 8 bytes by task 18008 on cpu 0: add_echo_byte drivers/tty/n_tty.c:845 [inline] echo_char+0x14e/0x1c0 drivers/tty/n_tty.c:948 n_tty_receive_char_special+0xb5f/0x1c10 drivers/tty/n_tty.c:1339 n_tty_receive_buf_fast drivers/tty/n_tty.c:1610 [inline] __receive_buf drivers/tty/n_tty.c:1644 [inline] n_tty_receive_buf_common+0x1844/0x1b00 drivers/tty/n_tty.c:1742 n_tty_receive_buf+0x3a/0x50 drivers/tty/n_tty.c:1771 tiocsti drivers/tty/tty_io.c:2197 [inline] tty_ioctl+0xb75/0xe10 drivers/tty/tty_io.c:2573 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x991/0xc60 fs/ioctl.c:696 ksys_ioctl+0xbd/0xe0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x4c/0x60 fs/ioctl.c:718 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 read to 0xffffc9000c433018 of 8 bytes by task 7 on cpu 1: flush_echoes drivers/tty/n_tty.c:828 [inline] __receive_buf drivers/tty/n_tty.c:1648 [inline] n_tty_receive_buf_common+0xe3f/0x1b00 drivers/tty/n_tty.c:1742 n_tty_receive_buf2+0x3d/0x60 drivers/tty/n_tty.c:1777 tty_ldisc_receive_buf+0x71/0xf0 drivers/tty/tty_buffer.c:461 tty_port_default_receive_buf+0x87/0xd0 drivers/tty/tty_port.c:38 receive_buf drivers/tty/tty_buffer.c:481 [inline] flush_to_ldisc+0x1d5/0x260 drivers/tty/tty_buffer.c:533 process_one_work+0x3d4/0x890 kernel/workqueue.c:2269 worker_thread+0xa0/0x800 kernel/workqueue.c:2415 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 7 Comm: kworker/u4:0 Not tainted 5.4.0-rc3+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound flush_to_ldisc ================================================================== --- This bug is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this bug report. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot.