1. 03 Mar, 2007 4 commits
    • Francois Romieu's avatar
      netpoll: drivers must not enable IRQ unconditionally in their NAPI handler · 4e0f3f7b
      Francois Romieu authored
      netpoll: drivers must not enable IRQ unconditionally in their NAPI handler
      
      net/core/netpoll.c::netpoll_send_skb() calls the poll handler when
      it is available. As netconsole can be used from almost any context,
      IRQ must not be enabled blindly in the NAPI handler of a driver which
      supports netpoll.
      
      b57bd066 fixed the issue for the
      8139too.c driver.
      Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4e0f3f7b
    • Eric Sandeen's avatar
      fix memory corruption from misinterpreted bad_inode_ops return values (CVE-2006-5753) · cf4e6070
      Eric Sandeen authored
      CVE-2006-5753 is for a case where an inode can be marked bad, switching
      the ops to bad_inode_ops, which are all connected as:
      
      static int return_EIO(void)
      {
              return -EIO;
      }
      
      #define EIO_ERROR ((void *) (return_EIO))
      
      static struct inode_operations bad_inode_ops =
      {
              .create         = bad_inode_create
      ...etc...
      
      The problem here is that the void cast causes return types to not be
      promoted, and for ops such as listxattr which expect more than 32 bits of
      return value, the 32-bit -EIO is interpreted as a large positive 64-bit
      number, i.e. 0x00000000fffffffa instead of 0xfffffffa.
      
      This goes particularly badly when the return value is taken as a number of
      bytes to copy into, say, a user's buffer for example...
      
      I originally had coded up the fix by creating a return_EIO_<TYPE> macro
      for each return type, like this:
      
      static int return_EIO_int(void)
      {
      	return -EIO;
      }
      #define EIO_ERROR_INT ((void *) (return_EIO_int))
      
      static struct inode_operations bad_inode_ops =
      {
      	.create		= EIO_ERROR_INT,
      ...etc...
      
      but Al felt that it was probably better to create an EIO-returner for each
      actual op signature.  Since so few ops share a signature, I just went ahead
      & created an EIO function for each individual file & inode op that returns
      a value.
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      cf4e6070
    • Thomas Renninger's avatar
      Backport of psmouse suspend/shutdown cleanups · 8658e1a8
      Thomas Renninger authored
      This patch works back to 2.6.17 (earlier kernels seem to
      need up/down operations on mutex/semaphore).
      
      psmouse - properly reset mouse on shutdown/suspend
      
      Some people report that they need psmouse module unloaded
      for suspend to ram/disk to work properly. Let's make port
      cleanup behave the same way as driver unload.
      
      This fixes "bad state" problem on various HP laptops, such
      as nx7400.
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: default avatarThomas Renninger <trenn@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8658e1a8
    • Hugh Dickins's avatar
      fix umask when noACL kernel meets extN tuned for ACLs · f3db3bf1
      Hugh Dickins authored
      Fix insecure default behaviour reported by Tigran Aivazian: if an ext2
      or ext3 or ext4 filesystem is tuned to mount with "acl", but mounted by
      a kernel built without ACL support, then umask was ignored when creating
      inodes - though root or user has umask 022, touch creates files as 0666,
      and mkdir creates directories as 0777.
      
      This appears to have worked right until 2.6.11, when a fix to the default
      mode on symlinks (always 0777) assumed VFS applies umask: which it does,
      unless the mount is marked for ACLs; but ext[234] set MS_POSIXACL in
      s_flags according to s_mount_opt set according to def_mount_opts.
      
      We could revert to the 2.6.10 ext[234]_init_acl (adding an S_ISLNK test);
      but other filesystems only set MS_POSIXACL when ACLs are configured.  We
      could fix this at another level; but it seems most robust to avoid setting
      the s_mount_opt flag in the first place (at the expense of more ifdefs).
      
      Likewise don't set the XATTR_USER flag when built without XATTR support.
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Acked-by: default avatarAndreas Gruenbacher <agruen@suse.de>
      Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f3db3bf1
  2. 24 Feb, 2007 21 commits
  3. 20 Feb, 2007 2 commits
  4. 05 Feb, 2007 13 commits