From: Lyude Paul <email@example.com> To: Jeremy Cline <firstname.lastname@example.org>, Ben Skeggs <email@example.com> Cc: David Airlie <firstname.lastname@example.org>, email@example.com, firstname.lastname@example.org, Karol Herbst <email@example.com>, firstname.lastname@example.org Subject: Re: [PATCH v2 0/3] drm/nouveau: fix a use-after-free in postclose() Date: Fri, 26 Mar 2021 18:00:51 -0400 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <firstname.lastname@example.org> This patch series is: Reviewed-by: Lyude Paul <email@example.com> Btw - in the future if you need to send a respin of multiple patches, you need to send it as it's own separate series instead of replying to the previous one (one-off respins can just be posted as replies though), otherwise patchwork won't pick it up On Wed, 2020-11-25 at 15:26 -0500, Jeremy Cline wrote: > This series fixes a number of use-after-frees in nouveau's postclose() > handler. It was discovered by pointing IGT's core_hotunplug tests at a > nouveau device, but the steps to reproduce it are simple: > > 1. Open the device file > 2. Unbind the driver or remove the device > 3. Close the file opened in step 1. > > During the device removal, the nouveau_drm structure is de-allocated, > but is dereferenced in the postclose() handler. > > One obvious solution is to ensure all the operations in the postclose() > handler are valid by extending the lifetime of the nouveau_drm > structure. This is possible with the new devm_drm_dev_alloc() interface, > but the change is somewhat invasive so I thought it best to submit that > work separately. > > Instead, we make use of the drm_dev_unplug() API, clean up all clients > in the device removal call, and check to make sure the device has not > been unplugged in the postclose() handler. While this does not enable > hot-unplug support for nouveau, it's enough to avoid crashing the kernel > and leads to all the core_hotunplug tests to pass. > > This series reroll addresses a missing mutex_destroy() call and a typo > in a commit message. > > Jeremy Cline (3): > drm/nouveau: use drm_dev_unplug() during device removal > drm/nouveau: Add a dedicated mutex for the clients list > drm/nouveau: clean up all clients on device removal > > drivers/gpu/drm/nouveau/nouveau_drm.c | 42 +++++++++++++++++++++++---- > drivers/gpu/drm/nouveau/nouveau_drv.h | 5 ++++ > 2 files changed, 42 insertions(+), 5 deletions(-) > -- Sincerely, Lyude Paul (she/her) Software Engineer at Red Hat Note: I deal with a lot of emails and have a lot of bugs on my plate. If you've asked me a question, are waiting for a review/merge on a patch, etc. and I haven't responded in a while, please feel free to send me another email to check on my status. I don't bite! _______________________________________________ dri-devel mailing list firstname.lastname@example.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-03-26 22:01 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-03 19:49 [PATCH " Jeremy Cline 2020-11-03 19:49 ` [PATCH 1/3] drm/nouveau: use drm_dev_unplug() during device removal Jeremy Cline 2020-11-03 19:49 ` [PATCH 2/3] drm/nouveau: Add a dedicated mutex for the clients list Jeremy Cline 2020-11-25 18:37 ` Lyude Paul 2020-11-25 19:45 ` Jeremy Cline 2020-11-03 19:49 ` [PATCH 3/3] drm/nouveau: clean up all clients on device removal Jeremy Cline 2020-11-25 18:44 ` Lyude Paul 2020-11-25 20:26 ` [PATCH v2 0/3] drm/nouveau: fix a use-after-free in postclose() Jeremy Cline 2020-11-25 20:26 ` [PATCH v2 1/3] drm/nouveau: use drm_dev_unplug() during device removal Jeremy Cline 2020-11-25 20:26 ` [PATCH v2 2/3] drm/nouveau: Add a dedicated mutex for the clients list Jeremy Cline 2020-11-25 20:26 ` [PATCH v2 3/3] drm/nouveau: clean up all clients on device removal Jeremy Cline 2021-03-26 22:00 ` Lyude Paul [this message] 2021-08-16 7:03 ` [PATCH v2 0/3] drm/nouveau: fix a use-after-free in postclose() Salvatore Bonaccorso 2021-08-17 20:32 ` Lyude Paul 2021-10-11 7:05 ` Salvatore Bonaccorso 2021-10-11 11:05 ` Karol Herbst
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 \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH v2 0/3] drm/nouveau: fix a use-after-free in postclose()' \ /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
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).