------- Comment From heinz-werner_se...@de.ibm.com 2018-12-03 11:02 EDT-------
IBM Bugzilla Status -> closed, Fix Released by Xenial, Bionic, Cosmic

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1800849

Title:
  [Ubuntu] kvm: fix deadlock when killed by oom

Status in Ubuntu on IBM z Systems:
  Fix Released
Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Xenial:
  Fix Released
Status in linux source package in Bionic:
  Fix Released
Status in linux source package in Cosmic:
  Fix Released

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
           handle_mm_fault does not release the mm_sem.
  Solution: Correct the issue by manually release the mm_sem when needed.

  == Fix ==

  306d6c49ac9ded11114cb53b0925da52f2c2ada1 ("s390/kvm: fix deadlock when
  killed by oom")

  == Patch ==

  commit 306d6c49ac9ded11114cb53b0925da52f2c2ada1
  Author: Claudio Imbrenda <imbre...@linux.vnet.ibm.com>
  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_RETRY_NOWAIT option is set. This leads to a deadlock
      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_RETRY_NOWAIT for guest 
fault")
      Cc: <sta...@vger.kernel.org> # 3.15+
      Signed-off-by: Claudio Imbrenda <imbre...@linux.vnet.ibm.com>
      Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com>

  == Regression Potential ==

  Low and minimal, because:

  - code change is s390x only
  - limited to one single file: /arch/s390/mm/fault.c
  - 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
                    handle_mm_fault does not release the mm_sem.

  Solution:     Correct the issue by manually relaese the mm_sem
                    when needed.

  Reproduction: Create numerous KVM guests so that the host starts
                    swapping and memory becomes overcomitted and the oom
                    killer is triggered.

  kernel 4.19
  Upstream-ID:  306d6c49ac9ded11114cb53b0925da52f2c2ada1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1800849/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to