1. 22 Jun, 2006 6 commits
    • Robin H. Johnson's avatar
      [PATCH] tmpfs: time granularity fix for [acm]time going backwards · 2fb0b930
      Robin H. Johnson authored
      I noticed a strange behavior in a tmpfs file system the other day, while
      building packages - occasionally, and seemingly at random, make decided to
      rebuild a target. However, only on tmpfs.
      
      A file would be created, and if checked, it had a sub-second timestamp.
      However, after an utimes related call where sub-seconds should be set, they
      were zeroed instead. In the case that a file was created, and utimes(...,NULL)
      was used on it in the same second, the timestamp on the file moved backwards.
      
      After some digging, I found that this was being caused by tmpfs not having a
      time granularity set, thus inheriting the default 1 second granularity.
      
      Hugh adds: yes, we missed tmpfs when the s_time_gran mods went into 2.6.11.
      Unfortunately, the granularity of CURRENT_TIME, often used in filesystems,
      does not match the default granularity set by alloc_super.  A few more such
      discrepancies have been found, but this is the most important to fix now.
      Signed-off-by: default avatarRobin H. Johnson <robbat2@gentoo.org>
      Acked-by: default avatarAndi Kleen <ak@suse.de>
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2fb0b930
    • Oleg Drokin's avatar
      [PATCH] Missed error checking for intent's filp in open_namei(). · 0bd99264
      Oleg Drokin authored
      It seems there is error check missing in open_namei for errors returned
      through intent.open.file (from lookup_instantiate_filp).
      
      If there is plain open performed, then such a check done inside
      __path_lookup_intent_open called from path_lookup_open(), but when the open
      is performed with O_CREAT flag set, then __path_lookup_intent_open is only
      called with LOOKUP_PARENT set where no file opening can occur yet.
      
      Later on lookup_hash is called where exact opening might take place and
      intent.open.file may be filled.  If it is filled with error value of some
      sort, then we get kernel attempting to dereference this error value as
      address (and corresponding oops) in nameidata_to_filp() called from
      filp_open().
      
      While this is relatively simple to workaround in ->lookup() method by just
      checking lookup_instantiate_filp() return value and returning error as
      needed, this is not so easy in ->d_revalidate(), where we can only return
      "yes, dentry is valid" or "no, dentry is invalid, perform full lookup
      again", and just returning 0 on error would cause extra lookup (with
      potential extra costly RPCs).
      
      So in short, I believe that there should be no difference in error handling
      for opening a file and creating a file in open_namei() and propose this
      simple patch as a solution.
      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>
      0bd99264
    • David Miller's avatar
      [PATCH] SPARC64: Fix missing fold at end of checksums. · 9d8e2ed7
      David Miller authored
      Both csum_partial() and the csum_partial_copy*() family of routines
      forget to do a final fold on the computed checksum value on sparc64.
      So do the standard Sparc "add + set condition codes, add carry"
      sequence, then make sure the high 32-bits of the return value are
      clear.
      
      Based upon some excellent detective work and debugging done by
      Richard Braun and Samuel Thibault.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9d8e2ed7
    • David Miller's avatar
      [PATCH] SPARC64: Respect gfp_t argument to dma_alloc_coherent(). · af948395
      David Miller authored
      Using asm-generic/dma-mapping.h does not work because pushing
      the call down to pci_alloc_coherent() causes the gfp_t argument
      of dma_alloc_coherent() to be ignored.
      
      Fix this by implementing things directly, and adding a gfp_t
      argument we can use in the internal call down to the PCI DMA
      implementation of pci_alloc_coherent().
      
      This fixes massive memory corruption when using the sound driver
      layer, which passes things like __GFP_COMP down into these
      routines and (correctly) expects that to work.
      
      This is a disk eater when sound is used, so it's pretty critical.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      af948395
    • David Miller's avatar
      [PATCH] SPARC64: Fix D-cache corruption in mremap · 76fc2aaf
      David Miller authored
      If we move a mapping from one virtual address to another,
      and this changes the virtual color of the mapping to those
      pages, we can see corrupt data due to D-cache aliasing.
      
      Check for and deal with this by overriding the move_pte()
      macro.  Set things up so that other platforms can cleanly
      override the move_pte() macro too.
      
      This long standing bug corrupts user memory, and in particular
      has been notorious for corrupting Debian package database
      files on sparc64 boxes.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      76fc2aaf
    • Stuart MacDonald's avatar
      [PATCH] USB: Whiteheat: fix firmware spurious errors · 0d9a5318
      Stuart MacDonald authored
      Attached patch fixes spurious errors during firmware load.
      Signed-off-by: default avatarStuart MacDonald <stuartm@connecttech.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      0d9a5318
  2. 20 Jun, 2006 5 commits
  3. 05 Jun, 2006 13 commits
  4. 31 May, 2006 2 commits
  5. 22 May, 2006 2 commits
    • Chris Wright's avatar
      Linux 2.6.16.18 · b7d06179
      Chris Wright authored
      b7d06179
    • Patrick McHardy's avatar
      [PATCH] NETFILTER: SNMP NAT: fix memory corruption (CVE-2006-2444) · 1db6b5a6
      Patrick McHardy authored
      CVE-2006-2444 - Potential remote DoS in SNMP NAT helper.
      
      Fix memory corruption caused by snmp_trap_decode:
      
      - When snmp_trap_decode fails before the id and address are allocated,
        the pointers contain random memory, but are freed by the caller
        (snmp_parse_mangle).
      
      - When snmp_trap_decode fails after allocating just the ID, it tries
        to free both address and ID, but the address pointer still contains
        random memory. The caller frees both ID and random memory again.
      
      - When snmp_trap_decode fails after allocating both, it frees both,
        and the callers frees both again.
      
      The corruption can be triggered remotely when the ip_nat_snmp_basic
      module is loaded and traffic on port 161 or 162 is NATed.
      
      Found by multiple testcases of the trap-app and trap-enc groups of the
      PROTOS c06-snmpv1 testsuite.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      1db6b5a6
  6. 20 May, 2006 12 commits