···6161 return -ENOSYS;6262}63636464-int hpux_wait(int *stat_loc)6464+int hpux_wait(int __user *stat_loc)6565{6666 return sys_waitpid(-1, stat_loc, 0);6767}···255255/* TODO: Are these put_user calls OK? Should they pass an int?256256 * (I copied it from sys_i386.c like this.)257257 */258258-static int hpux_uname(struct hpux_utsname *name)258258+static int hpux_uname(struct hpux_utsname __user *name)259259{260260 int error;261261···300300/* Note: HP-UX just uses the old suser() function to check perms301301 * in this system call. We'll use capable(CAP_SYS_ADMIN).302302 */303303-int hpux_utssys(char *ubuf, int n, int type)303303+int hpux_utssys(char __user *ubuf, int n, int type)304304{305305 int len;306306 int error;307307 switch( type ) {308308 case 0:309309 /* uname(): */310310- return( hpux_uname( (struct hpux_utsname *)ubuf ) );310310+ return hpux_uname((struct hpux_utsname __user *)ubuf);311311 break ;312312 case 1:313313 /* Obsolete (used to be umask().) */···315315 break ;316316 case 2:317317 /* ustat(): */318318- return( hpux_ustat(new_decode_dev(n), (struct hpux_ustat *)ubuf) );319319- break ;318318+ return hpux_ustat(new_decode_dev(n),319319+ (struct hpux_ustat __user *)ubuf);320320+ break;320321 case 3:321322 /* setuname():322323 *···333332 return -EINVAL ;334333 /* Unlike Linux, HP-UX truncates it if n is too big: */335334 len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ;336336- return( sys_sethostname(ubuf, len) );335335+ return sys_sethostname(ubuf, len);337336 break ;338337 case 4:339338 /* sethostname():···347346 return -EINVAL ;348347 /* Unlike Linux, HP-UX truncates it if n is too big: */349348 len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ;350350- return( sys_sethostname(ubuf, len) );349349+ return sys_sethostname(ubuf, len);351350 break ;352351 case 5:353352 /* gethostname():···357356 /* Unlike Linux, HP-UX returns an error if n==0: */358357 if ( n <= 0 )359358 return -EINVAL ;360360- return( sys_gethostname(ubuf, n) );359359+ return sys_gethostname(ubuf, n);361360 break ;362361 case 6:363362 /* Supposedly called from setuname() in libc.···421420 }422421}423422424424-int hpux_getdomainname(char *name, int len)423423+int hpux_getdomainname(char __user *name, int len)425424{426425 int nlen;427426 int err = -EFAULT;···472471 printk(KERN_DEBUG "hpux_sysfs called with arg1='%lx'\n", arg1);473472474473 if ( opcode == 1 ) { /* GETFSIND */ 475475- len = strlen_user((char *)arg1);474474+ char __user *user_fsname = (char __user *)arg1;475475+ len = strlen_user(user_fsname);476476 printk(KERN_DEBUG "len of arg1 = %d\n", len);477477 if (len == 0)478478 return 0;479479- fsname = (char *) kmalloc(len, GFP_KERNEL);480480- if ( !fsname ) {479479+ fsname = kmalloc(len, GFP_KERNEL);480480+ if (!fsname) {481481 printk(KERN_DEBUG "failed to kmalloc fsname\n");482482 return 0;483483 }484484485485- if ( copy_from_user(fsname, (char *)arg1, len) ) {485485+ if (copy_from_user(fsname, user_fsname, len)) {486486 printk(KERN_DEBUG "failed to copy_from_user fsname\n");487487 kfree(fsname);488488 return 0;···497495 fstype = 0;498496 } else {499497 fstype = 0;500500- };498498+ }501499502500 kfree(fsname);503501
+1-1
arch/parisc/kernel/pci-dma.c
···342342 pcxl_res_map = (char *)__get_free_pages(GFP_KERNEL,343343 get_order(pcxl_res_size));344344 memset(pcxl_res_map, 0, pcxl_res_size);345345- proc_gsc_root = proc_mkdir("gsc", 0);345345+ proc_gsc_root = proc_mkdir("gsc", NULL);346346 if (!proc_gsc_root)347347 printk(KERN_WARNING348348 "pcxl_dma_init: Unable to create gsc /proc dir entry\n");