Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2264057yba; Mon, 15 Apr 2019 08:11:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzqBUQ6vrNA+8AWEMJoBhHdkgMVIaSa3vtxCeuOUO/lVi4PoFs8cWlXVhk7N2MTepvC1n/u X-Received: by 2002:a65:6389:: with SMTP id h9mr71058286pgv.398.1555341116128; Mon, 15 Apr 2019 08:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555341116; cv=none; d=google.com; s=arc-20160816; b=FbQQRUSQEvc8iKKKrf1vo4r4sgtFsqjw5Y+IH8m0UstHZU53ajgl4xgxB8b52tV8n0 zFyzkGRrFYl8Vp1dLzEX8z8mUxNfk7/QHQZcPawYJRKuTPZ9g2STgiBvM6zVZnw83/na +2PwKhLjPdlJ9LsnQrjbZtbOpESdK9gyscPVX9rHmedXParKbSv5nF1YyymZ5unyp90V 8hyTIdGvsrl7Ql/XwEPxzBYMOydjepMjKr6IG+YYuTxzpFLbXb3cJM/WPt8icmnRFeO+ HRxcwbGDuOGyJdzPtxDM12Hs8ywoNDNNFazW1ckL4kqAkuWyYnMrczcZR8VRMMEv/AMg 2kIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:in-reply-to:references:message-id:cc:to:subject:from :dkim-signature:dkim-signature; bh=o+R+7V6FYI76MGf1Yo3KgDdQ+TCerityJJLqd48cM54=; b=HxfP4DyLRX9887OlKIEh0eKcqNoliyMei6uXGtGiHy8u8GIu/DdHdUcBZr/z1fo2gd zYt0PEiS3So/9kdcedbnN2AwKxXB4Gv7XH3+GTcappxb4XVJ1fJyrsBkyku/4g10SVYC 7yQqRIQNVXsSQ9Vl0DVM7p7XnK4Ft8XdKUO7SiLs4jlKOgKdyBKrtX02TGcjNke53P8y YOS4YPCDL8AXk+2uX5IEoJUIHJtmBZjqJNDkKhf9MNJ2DM9zpSoawGtEwodUAFs7oUoo WpRzW56X9xSyvyWg4RZref5V2juZb6jceEgrd2mxWxePXOX2nTV13i9w/r4RmIRndnpj mXGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nexedi.com header.s=mandrill header.b=kgiPTLqC; dkim=pass header.i=@mandrillapp.com header.s=mandrill header.b=BxwnmMa6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si45528652pgm.52.2019.04.15.08.11.39; Mon, 15 Apr 2019 08:11:56 -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=@nexedi.com header.s=mandrill header.b=kgiPTLqC; dkim=pass header.i=@mandrillapp.com header.s=mandrill header.b=BxwnmMa6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727799AbfDOPKG (ORCPT + 99 others); Mon, 15 Apr 2019 11:10:06 -0400 Received: from mail14.wdc04.mandrillapp.com ([205.201.139.14]:19541 "EHLO mail14.wdc04.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727386AbfDOPKG (ORCPT ); Mon, 15 Apr 2019 11:10:06 -0400 X-Greylist: delayed 902 seconds by postgrey-1.27 at vger.kernel.org; Mon, 15 Apr 2019 11:10:05 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=mandrill; d=nexedi.com; h=From:Subject:To:Cc:Message-Id:References:In-Reply-To:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; i=kirr@nexedi.com; bh=o+R+7V6FYI76MGf1Yo3KgDdQ+TCerityJJLqd48cM54=; b=kgiPTLqC2FOX6hS3mxrPXYwnEG7obABlqMJmNtRdvksQMoZOWzVwTRv1B9bF9kcWr4nmicqXUIHf W3qJechCeQi5Jl9OdEJuNExR5kfbvFxXqS3EGJ1W5LhrtDTp+AUGy9mBXaNthSWy0wul0mn7R1dE ne1Funt11jEKj3ScRPI= Received: from pmta08.mandrill.prod.suw01.rsglab.com (127.0.0.1) by mail14.wdc04.mandrillapp.com id hmifcq1jvmg7 for ; Mon, 15 Apr 2019 14:55:03 +0000 (envelope-from ) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; i=@mandrillapp.com; q=dns/txt; s=mandrill; t=1555340103; h=From : Subject : To : Cc : Message-Id : References : In-Reply-To : Date : MIME-Version : Content-Type : Content-Transfer-Encoding : From : Subject : Date : X-Mandrill-User : List-Unsubscribe; bh=o+R+7V6FYI76MGf1Yo3KgDdQ+TCerityJJLqd48cM54=; b=BxwnmMa6a23479Z7LpMFqIyo27Y6nZsQP3+EqVC7KuzgxZkOeoya6e5OTic2/Kn3CCnqaF NZA2bMpYwy9WetevxYMieDUc+lB1e2fNR68dNPNi3/HCQthWnHGrc1ELWo3o/U0QPaxMqQd6 PL7A06iR8SIS2p53kktOZKgyne5Eg= From: Kirill Smelkov Subject: Re: [PATCH] pci/switchtec: fix stream_open.cocci warnings (fwd) Received: from [87.98.221.171] by mandrillapp.com id 9dcccbe053fc416ea8af72280536ffea; Mon, 15 Apr 2019 14:55:03 +0000 To: Sebastian Andrzej Siewior Cc: Julia Lawall , , Kurt Schwemmer , Logan Gunthorpe , Bjorn Helgaas , , Message-Id: <20190415145456.GA15280@deco.navytux.spb.ru> References: <20190413170056.GA11293@deco.navytux.spb.ru> <20190415143857.kg2dbg3zxsxdktsi@linutronix.de> In-Reply-To: <20190415143857.kg2dbg3zxsxdktsi@linutronix.de> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=31050260.9dcccbe053fc416ea8af72280536ffea X-Mandrill-User: md_31050260 Date: Mon, 15 Apr 2019 14:55:03 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, On Mon, Apr 15, 2019 at 04:38:57PM +0200, Sebastian Andrzej Siewior wrote: > On 2019-04-13 17:00:59 [+0000], Kirill Smelkov wrote: > > Hello everyone, > Hi, > > > On Sat, Apr 13, 2019 at 06:50:57PM +0200, Julia Lawall wrote: > > > Hello, > > > > > > Kirill will explain about this issue. > > > > pci/switchtec switching to stream_open is already queued to merge > > window and it was acked by Logan Gunthorpe: > > > > https://lore.kernel.org/lkml/CAHk-=wgqgN5j1ZWnyVLqqoyU=CCWTYOko3MDyU8L_5e21KvHAg@mail.gmail.com/ > > https://lab.nexedi.com/kirr/linux/commit/edaeb4101860 > > > > ( there are too many Cc's in that patch and email with it and reply-all to > > it did not get into mailing list probably due to being considered as spam ) > > > > stream_open.cocci was issuing only warning for pci/switchtec, but after > > 8a29a3bae2a2 ("pci/switchtec: Don't use completion's wait queue") they > > started to use wait_even_* inside read method and, since > > stream_open.cocci considers wait_event_* as blocking the warning became > > error. Previously it was completions there, but I added support for wait > > events only for simplicity. > > why is wait_event_interruptible() treated differently compared to > wait_for_completion_interruptible()? No particular reason. I just taught stream_open.cocci to consider only "wait_event_*" as blocking: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/api/stream_open.cocci?h=v5.1-rc5#n35 based on original /proc/xen/xenbus deadlock: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/xen/xenbus/xenbus_dev_frontend.c?h=v5.1-rc5#n135 https://git.kernel.org/linus/581d21a2d02a We can extend "a function that blocks" rule to cover other kernel primitives. For the reference: the deadlock scenario is described in https://git.kernel.org/linus/10dce8af3422 Kirill