svn commit: r301436 - stable/10/sys/vm

Konstantin Belousov kib at FreeBSD.org
Sun Jun 5 08:42:34 UTC 2016


Author: kib
Date: Sun Jun  5 08:42:33 2016
New Revision: 301436
URL: https://svnweb.freebsd.org/changeset/base/301436

Log:
  MFC r300959:
  Do not leak the vm object lock when swap reservation failed, in
  vm_object_coalesce().

Modified:
  stable/10/sys/vm/vm_object.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/vm/vm_object.c
==============================================================================
--- stable/10/sys/vm/vm_object.c	Sun Jun  5 07:56:28 2016	(r301435)
+++ stable/10/sys/vm/vm_object.c	Sun Jun  5 08:42:33 2016	(r301436)
@@ -2132,6 +2132,7 @@ vm_object_coalesce(vm_object_t prev_obje
 		 */
 		if (!reserved && !swap_reserve_by_cred(ptoa(next_size),
 		    prev_object->cred)) {
+			VM_OBJECT_WUNLOCK(prev_object);
 			return (FALSE);
 		}
 		prev_object->charge += ptoa(next_size);


More information about the svn-src-stable mailing list