pid_namespace: pidns_get() should check task_active_pid_ns() != NULL
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | pid_namespace: pidns_get() should check task_active_pid_ns() != NULLkernel/ | +3 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/1] pid_namespace: pidns_get() should check task_active_pid_ns() != NULL
Quoted 9 lines · Oleg Nesterov
Especially because this code needs a fix. Yes,
rcu_read_lock()should be enough to ensure that ->parent and its namespace (if !NULL) can not go away, buttask_active_pid_ns()can return NULLrelease_task(->parent)was already (although this race is pure theoretical). So this helper should also check it is !NULL underrcu_read_lock(), afaics.(Hmm... off-topic, but
get_pidnslooks buggy by the same reason, I'll
send a fix).
Eric, I have to admit that I din't bother to actually verify this, but pidns_get() looks "obviously buggy". Could you ack/nack ?
Oleg.