Re: svn commit: r307236 - head/sys/vm

2016-10-13 Thread Mark Johnston
On Thu, Oct 13, 2016 at 01:49:29PM -0700, Conrad Meyer wrote:
> On Thu, Oct 13, 2016 at 1:39 PM, Mark Johnston  wrote:
> > Author: markj
> > Date: Thu Oct 13 20:39:34 2016
> > New Revision: 307236
> > URL: https://svnweb.freebsd.org/changeset/base/307236
> >
> > Log:
> >   Plug a potential vnode lock leak in vm_fault_hold().
> 
> This isn't just potential, right?  I believe we hit this one
> empirically with an assert in place of this if/vput.

Sorry, right, that was bad wording. I meant that the lock is not always
leaked in this error path - the map lookup needs to succeed initially,
after which we need to block for the vnode lock, restart the fault
handler, and then get an error from vm_map_lookup(). If the initial
lookup fails, there's no leak.
___
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"


Re: svn commit: r307236 - head/sys/vm

2016-10-13 Thread Conrad Meyer
On Thu, Oct 13, 2016 at 1:39 PM, Mark Johnston  wrote:
> Author: markj
> Date: Thu Oct 13 20:39:34 2016
> New Revision: 307236
> URL: https://svnweb.freebsd.org/changeset/base/307236
>
> Log:
>   Plug a potential vnode lock leak in vm_fault_hold().

This isn't just potential, right?  I believe we hit this one
empirically with an assert in place of this if/vput.

Best,
Conrad
___
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"


svn commit: r307236 - head/sys/vm

2016-10-13 Thread Mark Johnston
Author: markj
Date: Thu Oct 13 20:39:34 2016
New Revision: 307236
URL: https://svnweb.freebsd.org/changeset/base/307236

Log:
  Plug a potential vnode lock leak in vm_fault_hold().
  
  Reviewed by:  alc, kib
  MFC after:1 week
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D8242

Modified:
  head/sys/vm/vm_fault.c

Modified: head/sys/vm/vm_fault.c
==
--- head/sys/vm/vm_fault.c  Thu Oct 13 20:34:44 2016(r307235)
+++ head/sys/vm/vm_fault.c  Thu Oct 13 20:39:34 2016(r307236)
@@ -321,6 +321,8 @@ RetryFault:;
growstack = FALSE;
goto RetryFault;
}
+   if (fs.vp != NULL)
+   vput(fs.vp);
return (result);
}
 
___
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"