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
This commit is contained in:
parent
acfc07098c
commit
91a1929f07
@ -217,8 +217,10 @@ dev_pager_getpages(object, m, count, reqpage)
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user