Skip to content

make request_module() killable

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 4 repliesIn review

Changes from the cover letter

- improve the comments a bit

- reorder the changes so that 3/6 which changes kABI can be skipped, to simplify the backporting

- tried to test, seems to work

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6usermodehelper: introduce umh_complete(sub_info)kernel/kmod.c+7 -20 replies
2/6usermodehelper: implement UMH_KILLABLEinclude/linux/kmod.h kernel/kmod.c+27 -20 replies
3/6usermodehelper: kill umh_wait, renumber UMH_* constantsinclude/linux/kmod.h kernel/kmod.c security/keys/request_key.c+10 -182 replies
4/6usermodehelper: ____call_usermodehelper() doesn't need do_exit()kernel/kmod.c+1 -10 replies
5/6kmod: introduce call_modprobe() helperkernel/kmod.c+16 -80 replies
6/6kmod: make __request_module() killablekernel/kmod.c+24 -216 replies

Reviews trailers per patch

2 of 6 patches have a Reviewed-by or Acked-by.

PatchRusty RussellTejun HeoFrederic WeisbeckerMandeep Singh BainesPaul E. McKenney
1/6
2/6
3/6A-b
4/6
5/6
6/6A-b A-b A-b A-b A-b A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH 0/6] make request_module() killable

As Tetsuo pointed out, request_module() is very much unfriendly wrt OOM. It needs "a lot" of time/memory to finish while the caller is blocked in TASK_UNINTERRUPTIBLE.

Changes:

- improve the comments a bit

- reorder the changes so that 3/6 which changes kABI can be skipped, to simplify the backporting

- tried to test, seems to work

This series is orthogonal to kmod-avoid-deadlock-by-recursive-kmod-call.patch (which I still think should be replaced, I'll try to return to this later).

3/6 depends on usermodehelper-use-umh_wait_proc-consistently.patch

Many thanks to Tetsuo for the discussion.

Oleg.