1. 06 10月, 2012 33 次提交
  2. 05 10月, 2012 3 次提交
    • N
      sctp: check src addr when processing SACK to update transport state · edfee033
      Nicolas Dichtel 提交于
      Suppose we have an SCTP connection with two paths. After connection is
      established, path1 is not available, thus this path is marked as inactive. Then
      traffic goes through path2, but for some reasons packets are delayed (after
      rto.max). Because packets are delayed, the retransmit mechanism will switch
      again to path1. At this time, we receive a delayed SACK from path2. When we
      update the state of the path in sctp_check_transmitted(), we do not take into
      account the source address of the SACK, hence we update the wrong path.
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: NVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      edfee033
    • E
      ipv4: add a fib_type to fib_info · f4ef85bb
      Eric Dumazet 提交于
      commit d2d68ba9 (ipv4: Cache input routes in fib_info nexthops.)
      introduced a regression for forwarding.
      
      This was hard to reproduce but the symptom was that packets were
      delivered to local host instead of being forwarded.
      
      David suggested to add fib_type to fib_info so that we dont
      inadvertently share same fib_info for different purposes.
      
      With help from Julian Anastasov who provided very helpful
      hints, reproduced here :
      
      <quote>
              Can it be a problem related to fib_info reuse
      from different routes. For example, when local IP address
      is created for subnet we have:
      
      broadcast 192.168.0.255 dev DEV  proto kernel  scope link  src
      192.168.0.1
      192.168.0.0/24 dev DEV  proto kernel  scope link  src 192.168.0.1
      local 192.168.0.1 dev DEV  proto kernel  scope host  src 192.168.0.1
      
              The "dev DEV  proto kernel  scope link  src 192.168.0.1" is
      a reused fib_info structure where we put cached routes.
      The result can be same fib_info for 192.168.0.255 and
      192.168.0.0/24. RTN_BROADCAST is cached only for input
      routes. Incoming broadcast to 192.168.0.255 can be cached
      and can cause problems for traffic forwarded to 192.168.0.0/24.
      So, this patch should solve the problem because it
      separates the broadcast from unicast traffic.
      
              And the ip_route_input_slow caching will work for
      local and broadcast input routes (above routes 1 and 3) just
      because they differ in scope and use different fib_info.
      
      </quote>
      
      Many thanks to Chris Clayton for his patience and help.
      Reported-by: NChris Clayton <chris2553@googlemail.com>
      Bisected-by: NChris Clayton <chris2553@googlemail.com>
      Reported-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Julian Anastasov <ja@ssi.bg>
      Tested-by: NChris Clayton <chris2553@googlemail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4ef85bb
    • D
      UAPI: Fix conditional header installation handling (notably kvm_para.h on m68k) · f3dfd599
      David Howells 提交于
      The m68k arch doesn't have a kvm_para.h (unlike most or maybe all other
      arches), but there is one in asm-generic.  This means that:
      
      	ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
      			  $(srctree)/include/asm-$(SRCARCH)/kvm_para.h \
      			  $(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),)
      	header-y += kvm_para.h
      	endif
      
      gets it wrong because it is invoked twice during the header installation - and
      on the second occasion, asm-generic/kvm_para.h has been installed in usr/,
      thus triggering a attempt to install asm-m68k/kvm_para.h which will fail.
      
      There are three headers with this sort of conditional logic: a.out.h, kvm.h
      and kvm_para.h.  For all three of them, change the logic to be something like:
      
      	ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
      			  $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),)
      
      which finds the header in only the two places it should be found, and doesn't
      get incorrectly triggered by the installation of asm-generic's version.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      f3dfd599
  3. 04 10月, 2012 2 次提交
    • D
      UAPI: Fix the guards on various asm/unistd.h files · 89013952
      David Howells 提交于
      asm-generic/unistd.h and a number of asm/unistd.h files have been given
      reinclusion guards that allow the guard to be overridden if __SYSCALL is
      defined.  Unfortunately, these files define __SYSCALL and don't undefine it
      when they've finished with it, thus rendering the guard ineffective.
      
      The reason for this override is to allow the file to be #included multiple
      times with different settings on __SYSCALL for purposes like generating syscall
      tables.
      
      The following guards are problematic:
      
      arch/arm64/include/asm/unistd.h:#if !defined(__ASM_UNISTD_H) || defined(__SYSCALL)
      arch/arm64/include/asm/unistd32.h:#if !defined(__ASM_UNISTD32_H) || defined(__SYSCALL)
      arch/c6x/include/asm/unistd.h:#if !defined(_ASM_C6X_UNISTD_H) || defined(__SYSCALL)
      arch/hexagon/include/asm/unistd.h:#if !defined(_ASM_HEXAGON_UNISTD_H) || defined(__SYSCALL)
      arch/openrisc/include/asm/unistd.h:#if !defined(__ASM_OPENRISC_UNISTD_H) || defined(__SYSCALL)
      arch/score/include/asm/unistd.h:#if !defined(_ASM_SCORE_UNISTD_H) || defined(__SYSCALL)
      arch/tile/include/asm/unistd.h:#if !defined(_ASM_TILE_UNISTD_H) || defined(__SYSCALL)
      arch/unicore32/include/asm/unistd.h:#if !defined(__UNICORE_UNISTD_H__) || defined(__SYSCALL)
      include/asm-generic/unistd.h:#if !defined(_ASM_GENERIC_UNISTD_H) || defined(__SYSCALL)
      
      On the assumption that the guards' ineffectiveness has passed unnoticed, just
      remove these guards entirely.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      89013952
    • S
      xen/xen_initial_domain: check that xen_start_info is initialized · 4ed5978b
      Stefano Stabellini 提交于
      Since commit commit 4c071ee5 ("arm:
      initial Xen support") PV on HVM guests can be xen_initial_domain.
      However PV on HVM guests might have an unitialized xen_start_info, so
      check before accessing its fields.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Acked-by: NIan Campbell <Ian.Campbell@citrix.com>
      Reported-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      4ed5978b
  4. 03 10月, 2012 2 次提交
    • C
      MAX_LFS_FILESIZE should be a loff_t · 2bd2c194
      Chuck Lever 提交于
      fs/nfs/internal.h: In function ‘nfs_super_set_maxbytes’:
      fs/nfs/internal.h:547:21: warning: comparison between signed and
          unsigned integer expressions [-Wsign-compare]
      
      Seen with gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2).
      
      Commit 42cb56ae made s_maxbytes a loff_t, thus the type of
      MAX_LFS_FILESIZE should also be a loff_t.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2bd2c194
    • C
      compat: fs: Generic compat_sys_sendfile implementation · 8f9c0119
      Catalin Marinas 提交于
      This function is used by sparc, powerpc and arm64 for compat support.
      The patch adds a generic implementation which calls do_sendfile()
      directly and avoids set_fs().
      
      The sparc architecture has wrappers for the sign extensions while
      powerpc relies on the compiler to do the this. The patch adds wrappers
      for powerpc to handle the u32->int type conversion.
      
      compat_sys_sendfile64() can be replaced by a sys_sendfile() call since
      compat_loff_t has the same size as off_t on a 64-bit system.
      
      On powerpc, the patch also changes the 64-bit sendfile call from
      sys_sendile64 to sys_sendfile.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8f9c0119