Skip to content
  1. Apr 16, 2008
  2. Apr 15, 2008
    • Alexey Korolev's avatar
      JFFS2 Fix of panics caused by wrong condition for hole frag creation in write_begin · abe2f414
      Alexey Korolev authored
      This fixes a regression introduced in commit
      205c109a
      
       when switching to
      write_begin/write_end operations in JFFS2.
      
      The page offset is miscalculated, leading to corruption of the fragment
      lists and subsequently to memory corruption and panics.
      
      [ Side note: the bug is a fairly direct result of the naming.  Nick was
        likely misled by the use of "offs", since we tend to use the notion of
        "offset" not as an absolute position, but as an offset _within_ a page
        or allocation.
      
        Alternatively, a "pgoff_t" is a page index, but not a byte offset -
        our VM naming can be a bit confusing.
      
        So in this case, a VM person would likely have called this a "pos",
        not an "offs", or perhaps talked about byte offsets rather than page
        offsets (since it's counted in bytes, not pages).    - Linus ]
      
      Signed-off-by: default avatarAlexey Korolev <akorolev@infradead.org>
      Signed-off-by: default avatarVasiliy Leonenko <vasiliy.leonenko@mail.ru>
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      abe2f414
    • J. Bruce Fields's avatar
      locks: fix possible infinite loop in fcntl(F_SETLKW) over nfs · 19e729a9
      J. Bruce Fields authored
      Miklos Szeredi found the bug:
      
      	"Basically what happens is that on the server nlm_fopen() calls
      	nfsd_open() which returns -EACCES, to which nlm_fopen() returns
      	NLM_LCK_DENIED.
      
      	"On the client this will turn into a -EAGAIN (nlm_stat_to_errno()),
      	which in will cause fcntl_setlk() to retry forever."
      
      So, for example, opening a file on an nfs filesystem, changing
      permissions to forbid further access, then trying to lock the file,
      could result in an infinite loop.
      
      And Trond Myklebust identified the culprit, from Marc Eshel and I:
      
      	7723ec97
      
       "locks: factor out
      	generic/filesystem switch from setlock code"
      
      That commit claimed to just be reshuffling code, but actually introduced
      a behavioral change by calling the lock method repeatedly as long as it
      returned -EAGAIN.
      
      We assumed this would be safe, since we assumed a lock of type SETLKW
      would only return with either success or an error other than -EAGAIN.
      However, nfs does can in fact return -EAGAIN in this situation, and
      independently of whether that behavior is correct or not, we don't
      actually need this change, and it seems far safer not to depend on such
      assumptions about the filesystem's ->lock method.
      
      Therefore, revert the problematic part of the original commit.  This
      leaves vfs_lock_file() and its other callers unchanged, while returning
      fcntl_setlk and fcntl_setlk64 to their former behavior.
      
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      Tested-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Marc Eshel <eshel@almaden.ibm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      19e729a9
  3. Apr 14, 2008
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of... · a985aabe
      Linus Torvalds authored
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel:
        revert "sched: fix fair sleepers"
      a985aabe
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · 1018cf9b
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
        [libata] make ali_atapi_dma static
        [libata] sata_svw: fix reversed port count
      1018cf9b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 533bb8a4
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (31 commits)
        [BRIDGE]: Fix crash in __ip_route_output_key with bridge netfilter
        [NETFILTER]: ipt_CLUSTERIP: fix race between clusterip_config_find_get and _entry_put
        [IPV6] ADDRCONF: Don't generate temporary address for ip6-ip6 interface.
        [IPV6] ADDRCONF: Ensure disabling multicast RS even if privacy extensions are disabled.
        [IPV6]: Use appropriate sock tclass setting for routing lookup.
        [IPV6]: IPv6 extension header structures need to be packed.
        [IPV6]: Fix ipv6 address fetching in raw6_icmp_error().
        [NET]: Return more appropriate error from eth_validate_addr().
        [ISDN]: Do not validate ISDN net device address prior to interface-up
        [NET]: Fix kernel-doc for skb_segment
        [SOCK] sk_stamp: should be initialized to ktime_set(-1L, 0)
        net: check for underlength tap writes
        net: make struct tun_struct private to tun.c
        [SCTP]: IPv4 vs IPv6 addresses mess in sctp_inet[6]addr_event.
        [SCTP]: Fix compiler warning about const qualifiers
        [SCTP]: Fix protocol violation when receiving an error lenght INIT-ACK
        [SCTP]: Add check for hmac_algo parameter in sctp_verify_param()
        [NET_SCHED] cls_u32: refcounting fix for u32_delete()
        [DCCP]: Fix skb->cb conflicts with IP
        [AX25]: Potential ax25_uid_assoc-s leaks on module unload.
        ...
      533bb8a4
    • David Howells's avatar
      FRV: Correctly determine the address of an illegal instruction · 4f3f8e94
      David Howells authored
      
      
      Correctly determine the address of an illegal instruction.  The EPCR0 register
      holds this value (masked by EPCR0_PC) if the validity bit is set (masked by
      EPCR0_V).  So the test as to whether the contents of the register are usable
      should be involve checking the _V bit, not the _PC bits.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4f3f8e94
    • Ingo Molnar's avatar
      revert "sched: fix fair sleepers" · e2df9e09
      Ingo Molnar authored
      revert "sched: fix fair sleepers" (e22ecef1
      
      ),
      because it is causing audio skipping, see:
      
         http://bugzilla.kernel.org/show_bug.cgi?id=10428
      
      the patch is correct and the real cause of the skipping is not
      understood (tracing makes it go away), but time has run out so we'll
      revert it and re-try in 2.6.26.
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e2df9e09
    • Patrick McHardy's avatar
      [BRIDGE]: Fix crash in __ip_route_output_key with bridge netfilter · 159d8336
      Patrick McHardy authored
      
      
      The bridge netfilter code attaches a fake dst_entry with a pointer to a
      fake net_device structure to skbs it passes up to IPv4 netfilter. This
      leads to crashes when the skb is passed to __ip_route_output_key when
      dereferencing the namespace pointer.
      
      Since bridging can currently only operate in the init_net namespace,
      the easiest fix for now is to initialize the nd_net pointer of the
      fake net_device struct to &init_net.
      
      Should fix bugzilla 10323: http://bugzilla.kernel.org/show_bug.cgi?id=10323
      
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      159d8336