From: Johan Hovold <johan@kernel.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
freedreno@lists.freedesktop.org,
Vasily Gorbik <gor@linux.ibm.com>,
linux-s390@vger.kernel.org, David Airlie <airlied@linux.ie>,
linux-arm-msm@vger.kernel.org,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Johan Hovold <johan@kernel.org>,
Fabien Dessenne <fabien.dessenne@st.com>,
linux-kernel@vger.kernel.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
Harald Freudenberger <freude@linux.ibm.com>,
dri-devel@lists.freedesktop.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sean Paul <sean@poorly.run>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 0/4] treewide: fix interrupted release
Date: Fri, 11 Oct 2019 11:36:33 +0200 [thread overview]
Message-ID: <20191011093633.GD27819@localhost> (raw)
In-Reply-To: <20191010135043.GA16989@phenom.ffwll.local>
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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-10-11 9:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 13:13 [PATCH 0/4] treewide: fix interrupted release Johan Hovold
2019-10-10 13:13 ` [PATCH 1/4] drm/msm: fix memleak on release Johan Hovold
[not found] ` <20191010131333.23635-2-johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2019-10-30 10:01 ` Johan Hovold
2019-10-30 10:01 ` Johan Hovold
2019-11-12 10:40 ` Johan Hovold
2019-11-12 10:40 ` Johan Hovold
2019-11-12 14:01 ` Daniel Vetter
2019-11-12 14:01 ` Daniel Vetter
2019-11-12 16:32 ` Rob Clark
2019-11-12 16:32 ` Rob Clark
2019-11-12 20:42 ` Sean Paul
2019-11-12 20:42 ` Sean Paul
2019-10-10 13:13 ` [PATCH 2/4] media: bdisp: " Johan Hovold
2019-10-10 14:07 ` Fabien DESSENNE
2019-10-10 13:13 ` [PATCH 3/4] media: radio: wl1273: fix interrupt masking " Johan Hovold
2019-10-10 13:13 ` [PATCH 4/4] s390/zcrypt: fix memleak at release Johan Hovold
2019-10-14 6:18 ` Heiko Carstens
[not found] ` <20191010131333.23635-1-johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2019-10-10 13:50 ` [PATCH 0/4] treewide: fix interrupted release Daniel Vetter
2019-10-11 9:36 ` Johan Hovold [this message]
2019-10-14 8:48 ` Daniel Vetter
2019-10-14 16:13 ` Johan Hovold
2019-10-15 14:07 ` Daniel Vetter
[not found] ` <20191015140726.GN11828-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2019-10-21 9:55 ` Johan Hovold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191011093633.GD27819@localhost \
--to=johan@kernel.org \
--cc=airlied@linux.ie \
--cc=borntraeger@de.ibm.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabien.dessenne@st.com \
--cc=freedreno@lists.freedesktop.org \
--cc=freude@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sean@poorly.run \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).