Author: markj
Date: Fri Dec  8 17:16:35 2017
New Revision: 326699
URL: https://svnweb.freebsd.org/changeset/base/326699

Log:
  MFC r326371:
  Verify the object/vnode association after vget() in vm_pageout_clean().

Modified:
  stable/11/sys/vm/vm_pageout.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/vm_pageout.c
==============================================================================
--- stable/11/sys/vm/vm_pageout.c       Fri Dec  8 17:15:20 2017        
(r326698)
+++ stable/11/sys/vm/vm_pageout.c       Fri Dec  8 17:16:35 2017        
(r326699)
@@ -617,7 +617,17 @@ vm_pageout_clean(vm_page_t m, int *numpagedout)
                        goto unlock_mp;
                }
                VM_OBJECT_WLOCK(object);
+
+               /*
+                * Ensure that the object and vnode were not disassociated
+                * while locks were dropped.
+                */
+               if (vp->v_object != object) {
+                       error = ENOENT;
+                       goto unlock_all;
+               }
                vm_page_lock(m);
+
                /*
                 * While the object and page were unlocked, the page
                 * may have been:
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to