Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Tue, 3 Oct 2006 15:53:26 +0000 (08:53 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 3 Oct 2006 15:53:26 +0000 (08:53 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Update defconfig.
  [SPARC64]: Do not include compat.h from asm-sparc64/signal.h any more.
  [SPARC64]: Move signal compat bits to new header file.

1  2 
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sunos32.c

@@@ -61,6 -61,7 +61,7 @@@
  #include <asm/semaphore.h>
  #include <asm/mmu_context.h>
  #include <asm/a.out.h>
+ #include <asm/compat_signal.h>
  
  asmlinkage long sys32_chown16(const char __user * filename, u16 user, u16 group)
  {
@@@ -337,17 -338,12 +338,17 @@@ asmlinkage long sys32_ftruncate64(unsig
  
  int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf)
  {
 +      compat_ino_t ino;
        int err;
  
        if (stat->size > MAX_NON_LFS || !old_valid_dev(stat->dev) ||
            !old_valid_dev(stat->rdev))
                return -EOVERFLOW;
  
 +      ino = stat->ino;
 +      if (sizeof(ino) < sizeof(stat->ino) && ino != stat->ino)
 +              return -EOVERFLOW;
 +
        err  = put_user(old_encode_dev(stat->dev), &statbuf->st_dev);
        err |= put_user(stat->ino, &statbuf->st_ino);
        err |= put_user(stat->mode, &statbuf->st_mode);
@@@ -43,6 -43,7 +43,7 @@@
  #include <asm/idprom.h> /* for gethostid() */
  #include <asm/unistd.h>
  #include <asm/system.h>
+ #include <asm/compat_signal.h>
  
  /* For the nfs mount emulation */
  #include <linux/socket.h>
@@@ -280,20 -281,16 +281,20 @@@ static int sunos_filldir(void * __buf, 
        struct sunos_dirent __user *dirent;
        struct sunos_dirent_callback * buf = (struct sunos_dirent_callback *) __buf;
        int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
 +      u32 d_ino;
  
        buf->error = -EINVAL;   /* only used if we fail.. */
        if (reclen > buf->count)
                return -EINVAL;
 +      d_ino = ino;
 +      if (sizeof(d_ino) < sizeof(ino) && d_ino != ino)
 +              return -EOVERFLOW;
        dirent = buf->previous;
        if (dirent)
                put_user(offset, &dirent->d_off);
        dirent = buf->curr;
        buf->previous = dirent;
 -      put_user(ino, &dirent->d_ino);
 +      put_user(d_ino, &dirent->d_ino);
        put_user(namlen, &dirent->d_namlen);
        put_user(reclen, &dirent->d_reclen);
        if (copy_to_user(dirent->d_name, name, namlen))
@@@ -367,18 -364,14 +368,18 @@@ static int sunos_filldirentry(void * __
        struct sunos_direntry_callback * buf =
                (struct sunos_direntry_callback *) __buf;
        int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
 +      u32 d_ino;
  
        buf->error = -EINVAL;   /* only used if we fail.. */
        if (reclen > buf->count)
                return -EINVAL;
 +      d_ino = ino;
 +      if (sizeof(d_ino) < sizeof(ino) && d_ino != ino)
 +              return -EOVERFLOW;
        dirent = buf->previous;
        dirent = buf->curr;
        buf->previous = dirent;
 -      put_user(ino, &dirent->d_ino);
 +      put_user(d_ino, &dirent->d_ino);
        put_user(namlen, &dirent->d_namlen);
        put_user(reclen, &dirent->d_reclen);
        if (copy_to_user(dirent->d_name, name, namlen))