diff options
Diffstat (limited to 'arch/alpha/kernel/osf_sys.c')
| -rw-r--r-- | arch/alpha/kernel/osf_sys.c | 31 | 
1 files changed, 13 insertions, 18 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 9eb090582cf..14db93e4c8a 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -445,7 +445,7 @@ struct procfs_args {   * unhappy with OSF UFS. [CHECKME]   */  static int -osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags) +osf_ufs_mount(const char *dirname, struct ufs_args __user *args, int flags)  {  	int retval;  	struct cdfs_args tmp; @@ -465,7 +465,7 @@ osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags)  }  static int -osf_cdfs_mount(char *dirname, struct cdfs_args __user *args, int flags) +osf_cdfs_mount(const char *dirname, struct cdfs_args __user *args, int flags)  {  	int retval;  	struct cdfs_args tmp; @@ -485,7 +485,7 @@ osf_cdfs_mount(char *dirname, struct cdfs_args __user *args, int flags)  }  static int -osf_procfs_mount(char *dirname, struct procfs_args __user *args, int flags) +osf_procfs_mount(const char *dirname, struct procfs_args __user *args, int flags)  {  	struct procfs_args tmp; @@ -793,8 +793,7 @@ SYSCALL_DEFINE5(osf_getsysinfo, unsigned long, op, void __user *, buffer,   	case GSI_UACPROC:  		if (nbytes < sizeof(unsigned int))  			return -EINVAL; -		w = (current_thread_info()->flags >> ALPHA_UAC_SHIFT) & -			UAC_BITMASK; +		w = current_thread_info()->status & UAC_BITMASK;  		if (put_user(w, (unsigned int __user *)buffer))  			return -EFAULT;   		return 1; @@ -904,24 +903,20 @@ SYSCALL_DEFINE5(osf_setsysinfo, unsigned long, op, void __user *, buffer,  		break;   	case SSI_NVPAIRS: { -		unsigned long v, w, i; -		unsigned int old, new; +		unsigned __user *p = buffer; +		unsigned i; - 		for (i = 0; i < nbytes; ++i) { +		for (i = 0, p = buffer; i < nbytes; ++i, p += 2) { +			unsigned v, w, status; - 			if (get_user(v, 2*i + (unsigned int __user *)buffer)) - 				return -EFAULT; - 			if (get_user(w, 2*i + 1 + (unsigned int __user *)buffer)) +			if (get_user(v, p) || get_user(w, p + 1))   				return -EFAULT;   			switch (v) {   			case SSIN_UACPROC: -			again: -				old = current_thread_info()->flags; -				new = old & ~(UAC_BITMASK << ALPHA_UAC_SHIFT); -				new = new | (w & UAC_BITMASK) << ALPHA_UAC_SHIFT; -				if (cmpxchg(¤t_thread_info()->flags, -					    old, new) != old) -					goto again; +				w &= UAC_BITMASK; +				status = current_thread_info()->status; +				status = (status & ~UAC_BITMASK) | w; +				current_thread_info()->status = status;   				break;   			default:  |