patch-2.3.41 linux/arch/alpha/kernel/osf_sys.c
Next file: linux/arch/arm/kernel/signal.c
Previous file: linux/Makefile
Back to the patch index
Back to the overall index
- Lines: 72
- Date:
Thu Jan 27 06:32:14 2000
- Orig file:
v2.3.40/linux/arch/alpha/kernel/osf_sys.c
- Orig date:
Fri Jan 21 18:19:15 2000
diff -u --recursive --new-file v2.3.40/linux/arch/alpha/kernel/osf_sys.c linux/arch/alpha/kernel/osf_sys.c
@@ -504,7 +504,7 @@
{
int error;
- down(&uts_sem);
+ down_read(&uts_sem);
error = -EFAULT;
if (copy_to_user(name + 0, system_utsname.sysname, 32))
goto out;
@@ -519,7 +519,7 @@
error = 0;
out:
- up(&uts_sem);
+ up_read(&uts_sem);
return error;
}
@@ -569,7 +569,6 @@
unsigned len;
int i, error;
- lock_kernel();
error = verify_area(VERIFY_WRITE, name, namelen);
if (error)
goto out;
@@ -578,15 +577,14 @@
if (namelen > 32)
len = 32;
- down(&uts_sem);
+ down_read(&uts_sem);
for (i = 0; i < len; ++i) {
__put_user(system_utsname.domainname[i], name + i);
if (system_utsname.domainname[i] == '\0')
break;
}
- up(&uts_sem);
+ up_read(&uts_sem);
out:
- unlock_kernel();
return error;
}
@@ -810,7 +808,6 @@
char *res;
long len, err = -EINVAL;
- lock_kernel();
offset = command-1;
if (offset >= sizeof(sysinfo_table)/sizeof(char *)) {
/* Digital UNIX has a few unpublished interfaces here */
@@ -818,7 +815,7 @@
goto out;
}
- down(&uts_sem);
+ down_read(&uts_sem);
res = sysinfo_table[offset];
len = strlen(res)+1;
if (len > count)
@@ -827,9 +824,8 @@
err = -EFAULT;
else
err = 0;
- up(&uts_sem);
+ up_read(&uts_sem);
out:
- unlock_kernel();
return err;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)