X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=fs%2Fcompat_ioctl.c;h=65643def31825d99fa7df8399871fd4e2d8b4144;hb=4b85df0419d1fb135d9d845876e8c7ee1393f83c;hp=6972d242fbdfa429836979a1ca10bff227c70c1d;hpb=6272e2667965dfb5b59199f462cd0f001fb304a6;p=powerpc.git diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 6972d242fb..65643def31 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -684,8 +684,10 @@ static int hdio_getgeo(unsigned int fd, unsigned int cmd, unsigned long arg) if (!err) { err = copy_to_user (ugeo, &geo, 4); err |= __put_user (geo.start, &ugeo->start); + if (err) + err = -EFAULT; } - return err ? -EFAULT : 0; + return err; } static int hdio_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) @@ -3564,10 +3566,13 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, goto found_handler; } +#ifdef CONFIG_NET if (S_ISSOCK(filp->f_path.dentry->d_inode->i_mode) && cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { error = siocdevprivate_ioctl(fd, cmd, arg); - } else { + } else +#endif + { static int count; if (++count <= 50)