Grab Giant in physio() since non-giant drivers are starting to appear.
This commit is contained in:
parent
e4bbcfbc42
commit
f7e56e489d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118352
@ -41,6 +41,8 @@ physio(dev_t dev, struct uio *uio, int ioflag)
|
||||
u_int iolen;
|
||||
struct buf *bp;
|
||||
|
||||
/* We cannot trust the device driver to hold Giant for us */
|
||||
mtx_lock(&Giant);
|
||||
/* Keep the process UPAGES from being swapped. XXX: why ? */
|
||||
PHOLD(curproc);
|
||||
|
||||
@ -122,5 +124,6 @@ physio(dev_t dev, struct uio *uio, int ioflag)
|
||||
doerror:
|
||||
relpbuf(bp, NULL);
|
||||
PRELE(curproc);
|
||||
mtx_unlock(&Giant);
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user