svn commit: r223823 - head/sys/vm
Attilio Rao
attilio at FreeBSD.org
Wed Jul 6 15:09:52 UTC 2011
Author: attilio
Date: Wed Jul 6 15:09:52 2011
New Revision: 223823
URL: http://svn.freebsd.org/changeset/base/223823
Log:
Handle a race between device_pager and devsw in a more graceful manner:
return an error code rather than panic the kernel.
Sponsored by: Sandvine Incorporated
Reviewed by: kib
Tested by: pho
MFC after: 2 weeks
Modified:
head/sys/vm/device_pager.c
Modified: head/sys/vm/device_pager.c
==============================================================================
--- head/sys/vm/device_pager.c Wed Jul 6 09:43:25 2011 (r223822)
+++ head/sys/vm/device_pager.c Wed Jul 6 15:09:52 2011 (r223823)
@@ -217,8 +217,10 @@ dev_pager_getpages(object, m, count, req
memattr = object->memattr;
VM_OBJECT_UNLOCK(object);
csw = dev_refthread(dev, &ref);
- if (csw == NULL)
- panic("dev_pager_getpage: no cdevsw");
+ if (csw == NULL) {
+ VM_OBJECT_LOCK(object);
+ return (VM_PAGER_FAIL);
+ }
td = curthread;
fpop = td->td_fpop;
td->td_fpop = NULL;
More information about the svn-src-head
mailing list