Skip to content

af_unix: Fix priority inversion issue

Nam Cao linux-rt-devel lkml netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest1 patch 4 repliesIn review
  2. v33 patches 2 repliesSuperseded
  3. v23 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches7 repliesSuperseded

Changes in v4 from the cover letter

- Downsize this series to just removing the priority inversion. Garbage collector scheduling should still be cleaned up, but that is non-trivial and I do not want that to stand in the way of this simple fix.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1af_unix: Do not wait for garbage collector in sendmsg()net/unix/garbage.c+0 -33 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH net-next v4 0/1] af_unix: Fix priority inversion issue

Hi,

While auditing AF_UNIX sockets, I noticed that the sendmsg() code paths may block on the garbage collector running as workqueue. This can cause priority inversion and latency for real-time users.

The implementation does kindly avoid blocking "sane users". However, it is impossible to tell whether the kernel's definition of "sane users" accurately describes all users out there.

Digging into history and figuring out the reasons why sendmsg() needs to wait for garbage collector, it is determined that those reasons no longer apply.

v4:
- Downsize this series to just removing the priority inversion. Garbage collector scheduling should still be cleaned up, but that is non-trivial and I do not want that to stand in the way of this simple fix.

v3:
- Move unix_schedule_gc() to be after exit_task_work()

v2:
- Add patch [1/3]
- Rebase the other two patches onto the new patch
- Change commit message to be more precise

Nam Cao (1):
af_unix: Do not wait for garbage collector in sendmsg()

 net/unix/garbage.c | 3 ---
 1 file changed, 3 deletions(-)
Signature · 1 line
2.47.3