All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: amd-gfx@lists.freedesktop.org
Subject: [PATCHES][RFC][CFT] close_fd() misuses in amdgpu
Date: Tue, 4 Jun 2024 03:12:55 +0100	[thread overview]
Message-ID: <20240604021255.GO1629371@ZenIV> (raw)

	Use of close_fd() in cleanup on failure exits is
wrong; descriptor table is a shared data structure, and
as soon as you've inserted a file reference there it is
entirely possible for another thread to have move it
around, replace it or remove it.

	Fortunately, not many places are using it that
way; two of such are in amdgpu and AFAICS they are not
hard to get rid of.

	Patches are in followups; review and testing would
be very welcome - as it is, I've verified that they build,
but that's about it.

             reply	other threads:[~2024-06-04 12:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04  2:12 Al Viro [this message]
2024-06-04  2:13 ` [PATCH 1/2][RFC] amdgpu: fix a race in kfd_mem_export_dmabuf() Al Viro
2024-06-04 18:08   ` Felix Kuehling
2024-06-04 19:10     ` Al Viro
2024-06-04 19:17       ` [PATCH v2 " Al Viro
2024-06-05  9:14     ` [PATCH " Christian König
2024-06-06 21:57       ` Felix Kuehling
2024-06-04  2:14 ` [PATCH 2/2][RFC] amdkfd CRIU fixes Al Viro
2024-06-04 18:16   ` Felix Kuehling
2024-06-04 19:20     ` Al Viro

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=20240604021255.GO1629371@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=amd-gfx@lists.freedesktop.org \
    /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 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.