diff options
author | phk <phk@FreeBSD.org> | 2003-08-02 09:40:53 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-08-02 09:40:53 +0000 |
commit | e1e146913d8055d39386b57bb361a14ae5d879bb (patch) | |
tree | 4df55c3ceec1f36d298d6483bfef57bc2ac9ab5c | |
parent | c7a4739a1f858250a44b26b4db93425d9f12db0e (diff) | |
download | FreeBSD-src-e1e146913d8055d39386b57bb361a14ae5d879bb.zip FreeBSD-src-e1e146913d8055d39386b57bb361a14ae5d879bb.tar.gz |
Grab Giant in physio() since non-giant drivers are starting to appear.
-rw-r--r-- | sys/kern/kern_physio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index ee89dd1..20789d57f 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -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); } |