Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed
for i386, and from the code inspection, nothing in the arm/mips/sparc64 implementations depends on it. Discussed with: imp, nwhitehorn Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
This commit is contained in:
parent
51782e3a89
commit
8f4548ff25
@ -82,8 +82,6 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
|
||||
int error = 0;
|
||||
vm_offset_t addr, eaddr;
|
||||
|
||||
GIANT_REQUIRED;
|
||||
|
||||
while (uio->uio_resid > 0 && error == 0) {
|
||||
iov = uio->uio_iov;
|
||||
if (iov->iov_len == 0) {
|
||||
|
@ -52,7 +52,7 @@ static struct cdev *memdev, *kmemdev;
|
||||
|
||||
static struct cdevsw mem_cdevsw = {
|
||||
.d_version = D_VERSION,
|
||||
.d_flags = D_MEM|D_NEEDGIANT,
|
||||
.d_flags = D_MEM,
|
||||
.d_open = memopen,
|
||||
.d_read = memrw,
|
||||
.d_write = memrw,
|
||||
|
@ -86,10 +86,6 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
|
||||
int error = 0;
|
||||
vm_offset_t addr;
|
||||
|
||||
/* XXX UPS Why ? */
|
||||
GIANT_REQUIRED;
|
||||
|
||||
|
||||
if (dev2unit(dev) != CDEV_MINOR_MEM && dev2unit(dev) != CDEV_MINOR_KMEM)
|
||||
return EIO;
|
||||
|
||||
|
@ -85,8 +85,6 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
|
||||
cnt = 0;
|
||||
error = 0;
|
||||
|
||||
GIANT_REQUIRED;
|
||||
|
||||
pmap_page_init(&m);
|
||||
while (uio->uio_resid > 0 && !error) {
|
||||
iov = uio->uio_iov;
|
||||
|
@ -99,8 +99,6 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
|
||||
error = 0;
|
||||
ova = 0;
|
||||
|
||||
GIANT_REQUIRED;
|
||||
|
||||
while (uio->uio_resid > 0 && error == 0) {
|
||||
iov = uio->uio_iov;
|
||||
if (iov->iov_len == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user