Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2539675imm; Mon, 10 Sep 2018 02:46:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbVwH6sjNcmWBGSrehfTr4zB3Bj4q1RePStYP1ecLhCSSmR18L+i3TBTckVC8VRqz9raFNR X-Received: by 2002:a17:902:290a:: with SMTP id g10-v6mr21003861plb.110.1536572761738; Mon, 10 Sep 2018 02:46:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536572761; cv=none; d=google.com; s=arc-20160816; b=ToeluWdCc1MaZvIgOAFmvrIvO8DRcUy1NXKvwgAsSJd1UjqsepQ2AXFY3AsbFkMDaG E0Y6MypzZ8jICWIr8b/w3XNpYsFp2H4tRsein32sTGboDAOXmHg7J+ApXmnvG9ImF9gz 9wUMyTie6NPbwgq6pm+T3JugAdljyKDpM0Y4669WUuYrqzHPtEMEL291i3yfbwCVNJes c9g84eVtASsqVpaEyDNBD26rQ0NyNnu0GbK37Y0N/wgH+QPZJGs+GXKjFybWJrR1VMR8 pe101KHh43NLkMaEMPU26GzbfT3B1+TzpnKARalSSOwLrCbGGJDQnNPotAL59y5i10B7 gQ3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=YBt2LLg3d5Qo0TxZy9S5pEDXQ5aB88QJQEYbY43HYbk=; b=aD2hX8NZSMhQqaZcW8TMCLKnUF1La/ZYffiwLUH+lX85eyHfflSTUGoN6TQNbSwsc3 AmFKsfHDlcoTnnfFVOD3dYPTVPspYCXbPetn8t5bpH2tVcEn/LoTpFWAhmD/j7aWO33S 6n3N6ahbg3+Z+l6PdIydh320CDPXzzOfo5fvaRdaXuxfy5X/jVDvz9lcGI8r/zAAoWTb CNV14FEd4IVagOdoEusXP8TQVMHmybg1utz3EDm807ngDYZPQUwfUWlg1o7pL8wSIJGJ NbqAyaV9NdwCTmjD5/t1dMispD9DCXsPUy4fNfRw0pZY6IiKm+pj5ic+7J+HodsHUVf3 rBuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Eg4DYcG5; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si16942495pgb.107.2018.09.10.02.45.45; Mon, 10 Sep 2018 02:46:01 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=Eg4DYcG5; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728035AbeIJOhD (ORCPT + 99 others); Mon, 10 Sep 2018 10:37:03 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:53520 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727353AbeIJOhD (ORCPT ); Mon, 10 Sep 2018 10:37:03 -0400 Received: by mail-it0-f65.google.com with SMTP id p79-v6so28667427itp.3 for ; Mon, 10 Sep 2018 02:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YBt2LLg3d5Qo0TxZy9S5pEDXQ5aB88QJQEYbY43HYbk=; b=Eg4DYcG5H+Jqu/jgbv5bmFsSxte9WYzzMgjHTRY6nc+OEKpIbhzsP83wN0GdBnCqqQ +Xi/LjnUHHrpNmpgFydJE2dfR5ljVALGJHmP8dEMVxdA13efczwGcjAVH2X6ztcSi5p/ OBesMJIuFY3wZAk/Bje/dddTq0bki2ab3TrBkFBhYKuqKPnmSONybJ9Wepzp7gCzNOZ9 G4vGIsDU7wkmfhA0hqzFzld3MC8w9C59F8jV7igHVv+BaL1UDpdn1GViQH7bMD65nnks 112K8JiccGjwOFWQ/Jce0CutF7xFoK6IRtJ3C+hZrM2akqYiRtLjx7WAy40SuUKWW0ZG cNqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YBt2LLg3d5Qo0TxZy9S5pEDXQ5aB88QJQEYbY43HYbk=; b=XZXpTAPg/1iC76ipn23239co3qm5+GOW3U0lm9h/LKArL2xmmINmMoc7eMAqmrPayu VwPgxZFIhQIxiC+qNB8/JFKhC14MXAL44lFvBsXFwRvKZ4fB93Q7ARh1/whG07cXW8/t LA8LVWx5fIj2p90Hk/TXaPDQL1552b0RBt+JITBNfkpr4d78MCcks7h0mCmEGI273By3 hV4Xu7xO7Kjd3WDrv27ZGnkmobG/jagQFFqG5L5zj3CjKLGC7lujPXYmIXRdflAPo7H/ Fxkh/vJcSNLT8t35wR93x6IQBEzbMV+Kz920tKbw+AcNp92buMHPwFau0+MiPucdA/F5 eY9g== X-Gm-Message-State: APzg51COugfVyFHJJNJexbZ6UND932VwNkT88CcwfKFnYbE3KYJYBLHj yplArBpujFxB0DKbR8koRsP4b/fYUnSOkcFQDyu1bw== X-Received: by 2002:a24:ef43:: with SMTP id i64-v6mr16696191ith.47.1536572631532; Mon, 10 Sep 2018 02:43:51 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:5942:0:0:0:0:0 with HTTP; Mon, 10 Sep 2018 02:43:31 -0700 (PDT) In-Reply-To: References: <00000000000024df4605757495a8@google.com> From: Dmitry Vyukov Date: Mon, 10 Sep 2018 11:43:31 +0200 Message-ID: Subject: Re: possible deadlock in free_ioctx_users To: Miklos Szeredi Cc: syzbot , bcrl , linux-aio , linux-fsdevel , LKML , syzkaller-bugs , Al Viro Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 10, 2018 at 11:28 AM, Miklos Szeredi wrote: > On Sun, Sep 9, 2018 at 8:41 PM, syzbot > wrote: >> Hello, >> >> syzbot found the following crash on: >> >> HEAD commit: f8f65382c98a Merge tag 'for-linus' of git://git.kernel.org.. >> git tree: upstream >> console output: https://syzkaller.appspot.com/x/log.txt?x=113260ae400000 >> kernel config: https://syzkaller.appspot.com/x/.config?x=8f59875069d721b6 >> dashboard link: https://syzkaller.appspot.com/bug?extid=d86c4426a01f60feddc7 >> compiler: gcc (GCC) 8.0.1 20180413 (experimental) >> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=120baa9e400000 >> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13979cbe400000 >> >> IMPORTANT: if you fix the bug, please add the following tag to the commit: >> Reported-by: syzbot+d86c4426a01f60feddc7@syzkaller.appspotmail.com >> >> random: sshd: uninitialized urandom read (32 bytes read) >> random: sshd: uninitialized urandom read (32 bytes read) >> random: sshd: uninitialized urandom read (32 bytes read) >> >> ======================================================== >> WARNING: possible irq lock inversion dependency detected >> 4.19.0-rc2+ #229 Not tainted >> -------------------------------------------------------- >> swapper/0/0 just changed the state of lock: >> 00000000c02bddef (&(&ctx->ctx_lock)->rlock){..-.}, at: spin_lock_irq >> include/linux/spinlock.h:354 [inline] >> 00000000c02bddef (&(&ctx->ctx_lock)->rlock){..-.}, at: >> free_ioctx_users+0xbc/0x710 fs/aio.c:603 >> but this lock took another, SOFTIRQ-unsafe lock in the past: >> (&fiq->waitq){+.+.} >> >> >> and interrupts could create inverse lock ordering between them. >> >> >> other info that might help us debug this: >> Possible interrupt unsafe locking scenario: >> >> CPU0 CPU1 >> ---- ---- >> lock(&fiq->waitq); >> local_irq_disable(); >> lock(&(&ctx->ctx_lock)->rlock); >> lock(&fiq->waitq); >> >> lock(&(&ctx->ctx_lock)->rlock); > > Fuse device doesn't support AIO ops. So false positive, AFAICS. Hi Miklos, We still need to annotate this. How?