[Ubuntu] kvm: fix deadlock when killed by oom
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
High
|
Canonical Kernel Team | ||
linux (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Xenial |
Fix Released
|
High
|
Unassigned | ||
Bionic |
Fix Released
|
High
|
Unassigned | ||
Cosmic |
Fix Released
|
High
|
Unassigned |
Bug Description
== SRU Justification ==
Description: kvm: fix deadlock when killed by oom
Symptom: oom killer leaves processes in a deadlock state.
Problem: The problem arises in the rare cases in which
Solution: Correct the issue by manually release the mm_sem when needed.
== Fix ==
306d6c49ac9ded1
== Patch ==
commit 306d6c49ac9ded1
Author: Claudio Imbrenda <email address hidden>
Date: Mon Jul 16 10:38:57 2018 +0200
s390/kvm: fix deadlock when killed by oom
When the oom killer kills a userspace process in the page fault handler
while in guest context, the fault handler fails to release the mm_sem
if the FAULT_FLAG_
when tearing down the mm when the process terminates. This bug can only
happen when pfault is enabled, so only KVM clients are affected.
The problem arises in the rare cases in which handle_mm_fault does not
release the mm_sem. This patch fixes the issue by manually releasing
the mm_sem when needed.
Fixes: 24eb3a824c4f3 ("KVM: s390: Add FAULT_FLAG_
Cc: <email address hidden> # 3.15+
Signed-off-by: Claudio Imbrenda <email address hidden>
Signed-off-by: Martin Schwidefsky <email address hidden>
== Regression Potential ==
Low and minimal, because:
- code change is s390x only
- limited to one single file: /arch/s390/
- just two additional lines added (if stmt)
- Xenial and Cosmic already have this commit via upstream stable updates.
- Hence patch is just missing in Bionic.
- Test kernel was build for testting.
== Test Case ==
Create numerous KVM guests so that the host starts swapping
and memory becomes overcomitted and the oom killer is triggered.
__________
Description: kvm: fix deadlock when killed by oom
Symptom: oom killer leaves processes in a deadlock state.
Problem: The problem arises in the rare cases in which
Solution: Correct the issue by manually relaese the mm_sem
Reproduction: Create numerous KVM guests so that the host starts
kernel 4.19
Upstream-ID: 306d6c49ac9ded1
CVE References
tags: | added: architecture-s39064 bugnameltc-172752 severity-high targetmilestone-inin1810 |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → linux (Ubuntu) |
Changed in ubuntu-z-systems: | |
importance: | Undecided → High |
assignee: | nobody → Canonical Kernel Team (canonical-kernel-team) |
status: | New → Triaged |
Changed in linux (Ubuntu): | |
importance: | Undecided → High |
status: | New → Triaged |
assignee: | Skipper Bug Screeners (skipper-screen-team) → Joseph Salisbury (jsalisbury) |
Changed in linux (Ubuntu Xenial): | |
status: | New → Triaged |
Changed in linux (Ubuntu Bionic): | |
status: | New → Triaged |
Changed in linux (Ubuntu Cosmic): | |
status: | New → Triaged |
Changed in linux (Ubuntu Xenial): | |
importance: | Undecided → High |
Changed in linux (Ubuntu Bionic): | |
importance: | Undecided → High |
Changed in linux (Ubuntu Cosmic): | |
importance: | Undecided → High |
Changed in linux (Ubuntu Xenial): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
Changed in linux (Ubuntu Bionic): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
Changed in linux (Ubuntu Cosmic): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
Changed in linux (Ubuntu Cosmic): | |
status: | Triaged → Fix Released |
Changed in ubuntu-z-systems: | |
status: | Triaged → Fix Committed |
description: | updated |
Changed in linux (Ubuntu Bionic): | |
status: | In Progress → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → Fix Released |
tags: | added: cscc |
------- Comment From <email address hidden> 2018-10-31 10:23 EDT-------
Also to be applied to all releases in Service.