1. 20 Jan, 2010 4 commits
    • Erez Zadok's avatar
      ecryptfs: initialize private persistent file before dereferencing pointer · e27759d7
      Erez Zadok authored
      Ecryptfs_open dereferences a pointer to the private lower file (the one
      stored in the ecryptfs inode), without checking if the pointer is NULL.
      Right afterward, it initializes that pointer if it is NULL.  Swap order of
      statements to first initialize.  Bug discovered by Duckjin Kang.
      Signed-off-by: default avatarDuckjin Kang <fromdj2k@gmail.com>
      Signed-off-by: default avatarErez Zadok <ezk@cs.sunysb.edu>
      Cc: Dustin Kirkland <kirkland@canonical.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      e27759d7
    • Tyler Hicks's avatar
      eCryptfs: Remove mmap from directory operations · 38e3eaee
      Tyler Hicks authored
      Adrian reported that mkfontscale didn't work inside of eCryptfs mounts.
      Strace revealed the following:
      
      open("./", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
      fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
      open("./fonts.scale", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
      getdents(3, /* 80 entries */, 32768) = 2304
      open("./.", O_RDONLY) = 5
      fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
      fstat64(5, {st_mode=S_IFDIR|0755, st_size=16384, ...}) = 0
      mmap2(NULL, 16384, PROT_READ, MAP_PRIVATE, 5, 0) = 0xb7fcf000
      close(5) = 0
      --- SIGBUS (Bus error) @ 0 (0) ---
      +++ killed by SIGBUS +++
      
      The mmap2() on a directory was successful, resulting in a SIGBUS
      signal later.  This patch removes mmap() from the list of possible
      ecryptfs_dir_fops so that mmap() isn't possible on eCryptfs directory
      files.
      
      https://bugs.launchpad.net/ecryptfs/+bug/400443Reported-by: default avatarAdrian C. <anrxc@sysphere.org>
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      38e3eaee
    • Tyler Hicks's avatar
      eCryptfs: Add getattr function · f8f484d1
      Tyler Hicks authored
      The i_blocks field of an eCryptfs inode cannot be trusted, but
      generic_fillattr() uses it to instantiate the blocks field of a stat()
      syscall when a filesystem doesn't implement its own getattr().  Users
      have noticed that the output of du is incorrect on newly created files.
      
      This patch creates ecryptfs_getattr() which calls into the lower
      filesystem's getattr() so that eCryptfs can use its kstat.blocks value
      after calling generic_fillattr().  It is important to note that the
      block count includes the eCryptfs metadata stored in the beginning of
      the lower file plus any padding used to fill an extent before
      encryption.
      
      https://bugs.launchpad.net/ecryptfs/+bug/390833Reported-by: default avatarDominic Sacré <dominic.sacre@gmx.de>
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      f8f484d1
    • Tyler Hicks's avatar
      eCryptfs: Use notify_change for truncating lower inodes · 5f3ef64f
      Tyler Hicks authored
      When truncating inodes in the lower filesystem, eCryptfs directly
      invoked vmtruncate(). As Christoph Hellwig pointed out, vmtruncate() is
      a filesystem helper function, but filesystems may need to do more than
      just a call to vmtruncate().
      
      This patch moves the lower inode truncation out of ecryptfs_truncate()
      and renames the function to truncate_upper().  truncate_upper() updates
      an iattr for the lower inode to indicate if the lower inode needs to be
      truncated upon return.  ecryptfs_setattr() then calls notify_change(),
      using the updated iattr for the lower inode, to complete the truncation.
      
      For eCryptfs functions needing to truncate, ecryptfs_truncate() is
      reintroduced as a simple way to truncate the upper inode to a specified
      size and then truncate the lower inode accordingly.
      
      https://bugs.launchpad.net/bugs/451368Reported-by: default avatarChristoph Hellwig <hch@lst.de>
      Acked-by: default avatarDustin Kirkland <kirkland@canonical.com>
      Cc: ecryptfs-devel@lists.launchpad.net
      Cc: linux-fsdevel@vger.kernel.org
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      5f3ef64f
  2. 18 Jan, 2010 23 commits
  3. 17 Jan, 2010 13 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · 7dc9c484
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
        do_add_mount() should sanitize mnt_flags
        CIFS shouldn't make mountpoints shrinkable
        mnt_flags fixes in do_remount()
        attach_recursive_mnt() needs to hold vfsmount_lock over set_mnt_shared()
        may_umount() needs namespace_sem
        Fix configfs leak
        Fix the -ESTALE handling in do_filp_open()
        ecryptfs: Fix refcnt leak on ecryptfs_follow_link() error path
        Fix ACC_MODE() for real
        Unrot uml mconsole a bit
        hppfs: handle ->put_link()
        Kill 9p readlink()
        fix autofs/afs/etc. magic mountpoint breakage
      7dc9c484
    • Mike Frysinger's avatar
      modpost: fix segfault in sym_is() with prefixed arches · 3a5dd791
      Mike Frysinger authored
      The sym_is() compares a symbol in an attempt to automatically skip symbol
      prefixes.  It does this first by searching the real symbol with the normal
      unprefixed symbol.  But then it uses the length of the original symbol to
      check the end of the substring instead of the length of the symbol it is
      looking for.  On non-prefixed arches, this is effectively the same thing,
      so there is no problem.  On prefixed-arches, since this is exceeds by just
      one byte, a crash is rare and it is usually a NUL byte anyways.  But every
      once in a blue moon, you get the right page alignment and it segfaults.
      
      For example, on the Blackfin arch, sym_is() will be called with the real
      symbol "___mod_usb_device_table" as "symbol" when looking for the normal
      symbol "__mod_usb_device_table" as "name".  The substring will thus return
      one byte into "symbol" and store it into "match".  But then "match" will
      be indexed with the length of "symbol" instead of "name" and so we will
      exceed the storage.  i.e. the code ends up doing:
      	char foo[] = "abc"; return foo[strlen(foo)+1] == '\0';
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3a5dd791
    • Manu Abraham's avatar
      V4L/DVB (13851): Fix Input dependency for Mantis · fcd89de3
      Manu Abraham authored
      >
      >
      >
      > CONFIG_INPUT=n
      
      As reported by Randy Dunlap <randy.dunlap@oracle.com>:
      > ERROR: "ir_input_register" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "ir_input_unregister" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "ir_input_init" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "input_free_device" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "input_allocate_device" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      Signed-off-by: default avatarManu Abraham <manu@linuxtv.org>
      Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      fcd89de3
    • Mauro Carvalho Chehab's avatar
      V4L/DVB(13824a): mantis: Fix __devexit bad annotations · 4cf0b3f1
      Mauro Carvalho Chehab authored
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x13d7): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x1433): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x185e): Section mismatch in reference from the function hopper_pci_probe() to the function
      .devexit.text:mantis_i2c_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x18ba): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x68b8): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6914): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6d3f): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6d9b): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14634): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14690): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14abb): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14b17): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      Acked-by: default avatarManu Abraham <manu@linuxtv.org>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      4cf0b3f1
    • Mauro Carvalho Chehab's avatar
      V4L/DVB (13808b): mantis: replace DMA_nnBIT_MASK to DMA_BIT_MASK(32) · 184ac753
      Mauro Carvalho Chehab authored
      drivers/media/dvb/mantis/mantis_pci.c: In function ‘mantis_pci_init’:
      drivers/media/dvb/mantis/mantis_pci.c:76: warning: ‘DMA_nnBIT_MASK’ is deprecated
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      184ac753
    • Manu Abraham's avatar
    • Mauro Carvalho Chehab's avatar
      V4L/DVB(13808a): mantis: convert it to the new ir-core register/unregister functions · 9c0832e3
      Mauro Carvalho Chehab authored
      Fix a merge conflict between mantis and IR cleanups
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      9c0832e3
    • Manu Abraham's avatar
    • Manu Abraham's avatar
    • Manu Abraham's avatar
      28fddb7c
    • Manu Abraham's avatar
      f5ae4f6f
    • Manu Abraham's avatar
    • Manu Abraham's avatar