Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp681563ybp; Fri, 11 Oct 2019 02:37:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRHbWLK7pKwMgr0aAz1G8+xvpweeli71QKF7EN8mQxOZmMDginUrv1cNifAYih30OcewkG X-Received: by 2002:a50:b723:: with SMTP id g32mr12687209ede.13.1570786631579; Fri, 11 Oct 2019 02:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570786631; cv=none; d=google.com; s=arc-20160816; b=IxYxgbx1XH6IMfw7cp5oDYGCkanKXlu6YE4lHNgU3NySGVydztcyy6gNpuU/C7PvI3 bz98xQGHwGb1QCYS9CpNRli/niy4Pte4+pspoPYyRrnJlV9T60YJCIbHY3Hcp77kQJhE thb+J3Hbhy9gt5DHeTAS8eRqVNsEqh0EuU82qCaWvuFMXRUjokwKDa1VLqhJ4qGaL9u5 hUfhQDGZ2QjCfIorN3yb4KCwR/Bg9LWVvRUmiJNjGV+y0lh+U9Rbgg5BwnXbJ2cI2vfD PBqijdPkYjWloQn+HCWh8Sl+hEYtJpJ134LnGeAYN/8+/IYJd0J2nBYoy3r2ZFdKd7Nn dhdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=qlK9gLf5RoF6ICNJqAb4e5paI/AKdb6mnn7W5mQFGS0=; b=lN49EXrQaTn1DDrM0ARdHEHWaX5e5RW8EPye1EV1xywGxFoyGB5Gr7DAkPkOB7xZoU w4ikC5ANdoQkmJlFyXc+Zx0srldFriy3Mta7E79OzMw0GVEP459Y8bUa4fvXynpUsm2l tEG4x+y29ORj5lqsyX40RSJdAV6Z2PmuzlvwUVYV/wumPfdEeVLJYFO12zO/7cyN+lH2 G+pdpEzzQ5o0eIdO+U+BaJGtDP//yo0EI7D38M8ajkAiTfV6947jnCwPmprS0C2L/kUo FjDtI1HI4WUYMLDnbH26mfEEKbq5wreYAO42aDHZRboUhyOh3+lcBEb1F/Ac7XovCQS7 SYQQ== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k16si4946689ejc.134.2019.10.11.02.36.48; Fri, 11 Oct 2019 02:37:11 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727668AbfJKJg1 (ORCPT + 99 others); Fri, 11 Oct 2019 05:36:27 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:40853 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbfJKJg1 (ORCPT ); Fri, 11 Oct 2019 05:36:27 -0400 Received: by mail-lf1-f66.google.com with SMTP id d17so6561890lfa.7; Fri, 11 Oct 2019 02:36:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qlK9gLf5RoF6ICNJqAb4e5paI/AKdb6mnn7W5mQFGS0=; b=ASYBycLtttb85mOEqujHjzNaJ1CBKftLEp8d9y0oEDIEg56PY0AlVEV4Ol+wk1U/Cp sWycuGXNr1FiYjukc3Ru2DwLEb2yoA2pun0hPCkOa3a8BBYnLwvx4EQitas/NCsFkD8y VBQF1q+kSn09L2HW2g7VWhzaUnjf6ms7MtD59j/LPu2AF8V4OHdjKt7V7rkTC7JLyfiv 6Xib6TV0vtZXhi6POBowySVhzIRSgRjsgUpPHq83lt1Fc9xicb1av41EK5fcFz6KIuOw 8lQDihilkl+S5Ox9DVpxGBo9WiGxteli+fT+YyxdahSeWeyOJm8vaSEJ9yFUrgnpFg0Y 4oGA== X-Gm-Message-State: APjAAAU6KZOks7h0u718r1E/ud3Qe+V6eR/AvkiSbBVv1J4ZozBOp0Gv svMHFBpMFUInmPMrGbwjaLA= X-Received: by 2002:a19:23cc:: with SMTP id j195mr8266076lfj.91.1570786584009; Fri, 11 Oct 2019 02:36:24 -0700 (PDT) Received: from xi.terra (c-51f1e055.07-184-6d6c6d4.bbcust.telenor.se. [85.224.241.81]) by smtp.gmail.com with ESMTPSA id c16sm1961403lfj.8.2019.10.11.02.36.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Oct 2019 02:36:23 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.92.2) (envelope-from ) id 1iIrLd-0007T3-Ez; Fri, 11 Oct 2019 11:36:34 +0200 Date: Fri, 11 Oct 2019 11:36:33 +0200 From: Johan Hovold To: Daniel Vetter Cc: Johan Hovold , Rob Clark , Sean Paul , Fabien Dessenne , Mauro Carvalho Chehab , Harald Freudenberger , David Airlie , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-s390@vger.kernel.org, Greg Kroah-Hartman , Al Viro Subject: Re: [PATCH 0/4] treewide: fix interrupted release Message-ID: <20191011093633.GD27819@localhost> References: <20191010131333.23635-1-johan@kernel.org> <20191010135043.GA16989@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191010135043.GA16989@phenom.ffwll.local> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 10, 2019 at 03:50:43PM +0200, Daniel Vetter wrote: > On Thu, Oct 10, 2019 at 03:13:29PM +0200, Johan Hovold wrote: > > Two old USB drivers had a bug in them which could lead to memory leaks > > if an interrupted process raced with a disconnect event. > > > > Turns out we had a few more driver in other subsystems with the same > > kind of bug in them. > Random funny idea: Could we do some debug annotations (akin to > might_sleep) that splats when you might_sleep_interruptible somewhere > where interruptible sleeps are generally a bad idea? Like in > fops->release? There's nothing wrong with interruptible sleep in fops->release per se, it's just that drivers cannot return -ERESTARTSYS and friends and expect to be called again later. The return value from release() is ignored by vfs, and adding a splat in __fput() to catch these buggy drivers might be overkill. Johan