From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67F71C282CB for ; Wed, 6 Feb 2019 00:53:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 412CB217F9 for ; Wed, 6 Feb 2019 00:53:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728449AbfBFAxH (ORCPT ); Tue, 5 Feb 2019 19:53:07 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:32970 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbfBFAxH (ORCPT ); Tue, 5 Feb 2019 19:53:07 -0500 Received: by mail-pl1-f196.google.com with SMTP id z23so2337403plo.0; Tue, 05 Feb 2019 16:53:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=CpOW6aYD02lwpNJJdaNLYw6Uld4XECL5aQ1ZhBWhke8=; b=j0UKtamtGVljt+EqqeMdbToLOF7CCj9pMpMgQJO/bguLoSb90qU5rfo1mnmw8IhEv6 JNJydYOPu+R3NxsyVAqohZ9gaGgb3ysxHFD3EmFbmsvJJPo8K8CD8ma3LkqAcjHCggvR s8IOLyecFWRDmJE0J1Gg4QcQF9F3pwGEigxPMVSyNd66Vg4/Bxz2RlHxlOP7NeMWt8dh wf0I3AgUL+2FeS+fBt/igVkKhOeoZw6KXNYSMU/NlVLnlBvMMcPwJJ6ejqnlSwlqLujT nK5vX/RBr49ksImE3YaZcDwWJjaMeN4MQs/DafIgJ1xass3fOLb5CPleNKuAYuzQrUB7 KaVw== X-Gm-Message-State: AHQUAuZex9b5DyHJnYsypEEduljoKwZumu8TSGEM14u87NB7B5KNrpVV PCf73o9iPIfwZQ7I0JWbdr4= X-Google-Smtp-Source: AHgI3IaLPr7/yhS/qXt6Tr6LFurPd7ff6ADXXZkhWm5K1VhruMBTFjoavOtgIe7Ux1CbGpxQ2wxcBg== X-Received: by 2002:a17:902:7c93:: with SMTP id y19mr7811532pll.41.1549414386502; Tue, 05 Feb 2019 16:53:06 -0800 (PST) Received: from ?IPv6:2620:15c:2cd:203:5cdc:422c:7b28:ebb5? ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id o1sm9307085pgn.63.2019.02.05.16.53.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Feb 2019 16:53:05 -0800 (PST) Message-ID: <1549414384.34241.77.camel@acm.org> Subject: Re: [PATCH] aio: Fix locking in aio_poll() From: Bart Van Assche To: Miklos Szeredi , Christoph Hellwig Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-aio , syzbot , Avi Kivity , Eric Dumazet , stable Date: Tue, 05 Feb 2019 16:53:04 -0800 In-Reply-To: References: <20190204174555.83603-1-bvanassche@acm.org> <20190204174900.GA16229@lst.de> Content-Type: text/plain; charset="UTF-7" X-Mailer: Evolution 3.26.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, 2019-02-05 at 09:12 +-0100, Miklos Szeredi wrote: +AD4 Not all variants of the waitqueue interface require irqs to be +AD4 disabled, and fuse has nothing whatsoever to do with irqs, so there's +AD4 no sane reason to disable them. +AD4 +AD4 Also, AFAICS, the fuse device does not support asynchronous IO. I +AD4 just don't get what this is about... Hi Miklos, Could this be what happens? aio+AF8-poll() calls vfs+AF8-poll() vfs+AF8-poll() calls fuse+AF8-dev+AF8-poll() fuse+AF8-dev+AF8-poll() calls poll+AF8-wait(file, +ACY-fiq-+AD4-waitq, wait) poll+AF8-wait() calls aio+AF8-poll+AF8-queue+AF8-proc(file, +ACY-fiq-+AD4-waitq, wait) aio+AF8-poll+AF8-queue+AF8-proc() stores +ACY-fiq-+AD4-waitq in pt-+AD4-iocb-+AD4-poll.head aio+AF8-poll() calls spin+AF8-lock+AF8-irq(+ACY-ctx-+AD4-ctx+AF8-lock) aio+AF8-poll() calls spin+AF8-lock(+ACY-req-+AD4-head-+AD4-lock) (req +AD0APQ +ACY-pt-+AD4-iocb-+AD4-poll). I think the lockdep complaint is about the FUSE fiq-+AD4-waitq lock not being IRQ-safe and about aio+AF8-poll() creating a dependency between an IRQ-safe lock (ctx-+AD4-ctx+AF8-lock) and a lock that is not IRQ-safe (fiq-+AD4-waitq). Thanks, Bart.