From: Lyude Paul <lyude@redhat.com> To: Zwane Mwaikambo <zwanem@gmail.com> Cc: Daniel Vetter <daniel@ffwll.ch>, tcamuso@redhat.com, dkwon@redhat.com, Linux Kernel <linux-kernel@vger.kernel.org>, dri-devel <dri-devel@lists.freedesktop.org> Subject: Re: [PATCH] drm: assure aux_dev is nonzero before using it Date: Tue, 08 Sep 2020 14:41:42 -0400 [thread overview] Message-ID: <5b63113be2e02d15268470d54b0cffeae06c5292.camel@redhat.com> (raw) In-Reply-To: <alpine.DEB.2.21.2008181057090.8571@montezuma.home> On Tue, 2020-08-18 at 10:58 -0700, Zwane Mwaikambo wrote: > On Wed, 12 Aug 2020, Lyude Paul wrote: > > > On Wed, 2020-08-12 at 16:10 +0200, Daniel Vetter wrote: > > > On Wed, Aug 12, 2020 at 12:16 AM Zwane Mwaikambo <zwanem@gmail.com> > > > wrote: > > > > On Tue, 11 Aug 2020, Daniel Vetter wrote: > > > > > > > > > On Mon, Aug 10, 2020 at 10:11:50AM -0700, Zwane Mwaikambo wrote: > > > > > > Hi Folks, > > > > > > I know this thread eventually dropped off due to not > > > > > > identifying > > > > > > the underlying issue. It's still occuring on 5.8 and in my case it > > > > > > happened because the udev device nodes for the DP aux devices were > > > > > > not > > > > > > cleaned up whereas the kernel had no association with them. I can > > > > > > reproduce the bug just by creating a device node for a non- > > > > > > existent > > > > > > minor > > > > > > device and calling open(). > > > > > > > > > > Hm I don't have that thread anymore, but generally these bugs are > > > > > solved > > > > > by not registering the device before it's ready for use. We do have > > > > > drm_connector->late_register for that stuff. Just a guess since I'm > > > > > not > > > > > seeing full details here. > > > > > > > > In this particular case, the physical device disappeared before the > > > > nodes > > > > were cleaned up. It involves putting a computer to sleep with a > > > > monitor > > > > plugged in and then waking it up with the monitor unplugged. > > > > > > We also have early_unregister for the reverse, but yes this sounds > > > more tricky ... Adding Lyude who's been working on way too much > > > lifetime fun around dp recently. > > > -Daniel > > > > > Hi-I think just checking whether the auxdev is NULL or not is a reasonable > > fix, although I am curious as to how exactly the aux dev's parent is > > getting > > destroyed before it's child, which I would have thought would be the only > > way > > you could hit this? > > Hi, If this is acceptable, would you consider an updated patch against > 5.8? Sure-although the process to getting this into stable is to get the patch into drm-next first, then it can get cherry-picked into the stable kernel branches. See https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > > Thanks, > Zwane > -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat
WARNING: multiple messages have this Message-ID (diff)
From: Lyude Paul <lyude@redhat.com> To: Zwane Mwaikambo <zwanem@gmail.com> Cc: dri-devel <dri-devel@lists.freedesktop.org>, dkwon@redhat.com, Linux Kernel <linux-kernel@vger.kernel.org>, tcamuso@redhat.com Subject: Re: [PATCH] drm: assure aux_dev is nonzero before using it Date: Tue, 08 Sep 2020 14:41:42 -0400 [thread overview] Message-ID: <5b63113be2e02d15268470d54b0cffeae06c5292.camel@redhat.com> (raw) In-Reply-To: <alpine.DEB.2.21.2008181057090.8571@montezuma.home> On Tue, 2020-08-18 at 10:58 -0700, Zwane Mwaikambo wrote: > On Wed, 12 Aug 2020, Lyude Paul wrote: > > > On Wed, 2020-08-12 at 16:10 +0200, Daniel Vetter wrote: > > > On Wed, Aug 12, 2020 at 12:16 AM Zwane Mwaikambo <zwanem@gmail.com> > > > wrote: > > > > On Tue, 11 Aug 2020, Daniel Vetter wrote: > > > > > > > > > On Mon, Aug 10, 2020 at 10:11:50AM -0700, Zwane Mwaikambo wrote: > > > > > > Hi Folks, > > > > > > I know this thread eventually dropped off due to not > > > > > > identifying > > > > > > the underlying issue. It's still occuring on 5.8 and in my case it > > > > > > happened because the udev device nodes for the DP aux devices were > > > > > > not > > > > > > cleaned up whereas the kernel had no association with them. I can > > > > > > reproduce the bug just by creating a device node for a non- > > > > > > existent > > > > > > minor > > > > > > device and calling open(). > > > > > > > > > > Hm I don't have that thread anymore, but generally these bugs are > > > > > solved > > > > > by not registering the device before it's ready for use. We do have > > > > > drm_connector->late_register for that stuff. Just a guess since I'm > > > > > not > > > > > seeing full details here. > > > > > > > > In this particular case, the physical device disappeared before the > > > > nodes > > > > were cleaned up. It involves putting a computer to sleep with a > > > > monitor > > > > plugged in and then waking it up with the monitor unplugged. > > > > > > We also have early_unregister for the reverse, but yes this sounds > > > more tricky ... Adding Lyude who's been working on way too much > > > lifetime fun around dp recently. > > > -Daniel > > > > > Hi-I think just checking whether the auxdev is NULL or not is a reasonable > > fix, although I am curious as to how exactly the aux dev's parent is > > getting > > destroyed before it's child, which I would have thought would be the only > > way > > you could hit this? > > Hi, If this is acceptable, would you consider an updated patch against > 5.8? Sure-although the process to getting this into stable is to get the patch into drm-next first, then it can get cherry-picked into the stable kernel branches. See https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > > Thanks, > Zwane > -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-09-08 18:45 UTC|newest] Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-10 17:11 [PATCH] drm: assure aux_dev is nonzero before using it Zwane Mwaikambo 2020-08-10 17:11 ` Zwane Mwaikambo 2020-08-11 8:58 ` Daniel Vetter 2020-08-11 8:58 ` Daniel Vetter 2020-08-11 22:16 ` Zwane Mwaikambo 2020-08-11 22:16 ` Zwane Mwaikambo 2020-08-12 14:10 ` Daniel Vetter 2020-08-12 14:10 ` Daniel Vetter 2020-08-12 15:44 ` Lyude Paul 2020-08-12 15:44 ` Lyude Paul 2020-08-12 20:21 ` Zwane Mwaikambo 2020-08-12 20:21 ` Zwane Mwaikambo 2020-09-04 7:21 ` [PATCH]] drm/dp check aux_dev before use in drm_dp_aux_dev_get_by_minor() Zwane Mwaikambo 2020-09-04 7:21 ` Zwane Mwaikambo 2020-09-07 11:05 ` Ville Syrjälä 2020-09-07 11:05 ` Ville Syrjälä 2020-09-08 16:18 ` Zwane Mwaikambo 2020-09-08 16:18 ` Zwane Mwaikambo 2020-08-18 17:58 ` [PATCH] drm: assure aux_dev is nonzero before using it Zwane Mwaikambo 2020-08-18 17:58 ` Zwane Mwaikambo 2020-09-08 18:41 ` Lyude Paul [this message] 2020-09-08 18:41 ` Lyude Paul -- strict thread matches above, loose matches on Subject: below -- 2019-05-23 11:09 tcamuso 2019-05-23 11:09 ` tcamuso 2019-05-24 8:36 ` Jani Nikula 2019-05-24 8:36 ` Jani Nikula 2019-05-24 10:48 ` tony camuso 2019-05-24 11:58 ` Ville Syrjälä 2019-07-10 13:47 ` Tony Camuso 2019-07-10 13:56 ` Ville Syrjälä 2019-07-12 16:07 ` Tony Camuso 2019-07-12 17:06 ` Ville Syrjälä 2019-07-12 17:35 ` Tony Camuso 2019-09-23 15:03 ` Tony Camuso 2019-09-23 15:22 ` Ville Syrjälä
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=5b63113be2e02d15268470d54b0cffeae06c5292.camel@redhat.com \ --to=lyude@redhat.com \ --cc=daniel@ffwll.ch \ --cc=dkwon@redhat.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=tcamuso@redhat.com \ --cc=zwanem@gmail.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.