1. 05 9月, 2013 5 次提交
    • J
      drivers:net: delete premature free_irq · 0a171933
      Julia Lawall 提交于
      Free_irq is not needed if there has been no request_irq.  Free_irq is
      removed from both the probe and remove functions.  The correct request_irq
      and free_irq are found in the open and close functions.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression e;
      @@
      
      *e = platform_get_irq(...);
      ... when != request_irq(e,...)
      *free_irq(e,...)
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0a171933
    • C
      net: sync some IP headers with glibc · cfd280c9
      Carlos O'Donell 提交于
      Solution:
      =========
      
      - Synchronize linux's `include/uapi/linux/in6.h'
        with glibc's `inet/netinet/in.h'.
      - Synchronize glibc's `inet/netinet/in.h with linux's
        `include/uapi/linux/in6.h'.
      - Allow including the headers in either other.
      - First header included defines the structures and macros.
      
      Details:
      ========
      
      The kernel promises not to break the UAPI ABI so I don't
      see why we can't just have the two userspace headers
      coordinate?
      
      If you include the kernel headers first you get those,
      and if you include the glibc headers first you get those,
      and the following patch arranges a coordination and
      synchronization between the two.
      
      Let's handle `include/uapi/linux/in6.h' from linux,
      and `inet/netinet/in.h' from glibc and ensure they compile
      in any order and preserve the required ABI.
      
      These two patches pass the following compile tests:
      
      cat >> test1.c <<EOF
      int main (void) {
        return 0;
      }
      EOF
      gcc -c test1.c
      
      cat >> test2.c <<EOF
      int main (void) {
        return 0;
      }
      EOF
      gcc -c test2.c
      
      One wrinkle is that the kernel has a different name for one of
      the members in ipv6_mreq. In the kernel patch we create a macro
      to cover the uses of the old name, and while that's not entirely
      clean it's one of the best solutions (aside from an anonymous
      union which has other issues).
      
      I've reviewed the code and it looks to me like the ABI is
      assured and everything matches on both sides.
      
      Notes:
      - You want netinet/in.h to include bits/in.h as early as possible,
        but it needs in_addr so define in_addr early.
      - You want bits/in.h included as early as possible so you can use
        the linux specific code to define __USE_KERNEL_DEFS based on
        the _UAPI_* macro definition and use those to cull in.h.
      - glibc was missing IPPROTO_MH, added here.
      
      Compile tested and inspected.
      Reported-by: NThomas Backlund <tmb@mageia.org>
      Cc: Thomas Backlund <tmb@mageia.org>
      Cc: libc-alpha@sourceware.org
      Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Cc: David S. Miller <davem@davemloft.net>
      Tested-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NCarlos O'Donell <carlos@redhat.com>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cfd280c9
    • D
      sfc: check for allocation failure · 42a5a5c1
      Dan Carpenter 提交于
      It upsets static analyzers when we don't check for allocation failure.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42a5a5c1
    • D
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · b163b42f
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      This series contains updates to igb only.
      
      Todd provides a fix for igb to not look for a PBA in the iNVM on
      devices that are flashless.
      
      Akeem provides igb patches to add a new PHY id for i354, as well as
      a couple of patches to implement the new PHY id.  He also provides
      several patches to correctly report the appropriate media type as
      well as correctly report advertised/supported link for i354 devices.
      Lastly Akeem implements a 1 second delay mechanism for i210 devices
      to avoid erroneous link issue with the link partner.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b163b42f
    • D
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 48f8e0af
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      The following batch contains:
      
      * Three fixes for the new synproxy target available in your
        net-next tree, from Jesper D. Brouer and Patrick McHardy.
      
      * One fix for TCPMSS to correctly handling the fragmentation
        case, from Phil Oester. I'll pass this one to -stable.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48f8e0af
  2. 04 9月, 2013 35 次提交