09 Feb, 2007

32 commits

  • This patch checks return values:

    - irlmp_register_client()
    - irlmp_register_service()
    - irlan_open()

    Signed-off-by: Akinobu Mita
    Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    Akinobu Mita
     
  • This patch checks return value of memory allocation functions
    for irda subsystem and fixes memory leaks in error cases.

    Signed-off-by: Akinobu Mita
    Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    Akinobu Mita
     
  • There was no real useful information from the unregister_netdevice() return
    code, the only error occurred in a situation that was a driver bug. So
    change it to a void function.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • Add checksum default defines for mobility header(MH) which
    goes through raw socket. As the result kernel's behavior is
    to handle MH checksum as default.

    This patch also removes verifying inbound MH checksum at
    mip6_mh_filter() since it did not consider user specified
    checksum offset and was redundant check with raw socket code.

    Signed-off-by: Masahide NAKAMURA
    Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    Masahide NAKAMURA
     
  • add_grhead() allocates memory with GFP_ATOMIC and in at least two places skb
    from it passed to skb_put() without checking.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     
  • When we can't find the afinfo we should return EAFNOSUPPORT.
    GCC warned about the uninitialized 'err' for this path as well.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This is the patch to support IPv4 over IPv6 IPsec.

    Signed-off-by: Miika Komu
    Signed-off-by: Diego Beltrami
    Signed-off-by: Kazunori Miyazawa
    Signed-off-by: David S. Miller

    Miika Komu
     
  • This is the patch to support IPv6 over IPv4 IPsec

    Signed-off-by: Miika Komu
    Signed-off-by: Diego Beltrami
    Signed-off-by: Kazunori Miyazawa
    Signed-off-by: David S. Miller

    Miika Komu
     
  • This patch exports xfrm_state_afinfo.

    Signed-off-by: Miika Komu
    Signed-off-by: Diego Beltrami
    Signed-off-by: Kazunori Miyazawa
    Signed-off-by: David S. Miller

    Miika Komu
     
  • Replace kmalloc() + memset() pairs with the appropriate kzalloc() calls in
    the bonding driver.

    Signed-off-by: Joe Jin
    Signed-off-by: Andrew Morton

    Joe Jin
     
  • During an oprofile session of linux-2.6.20 on a dual opteron system, I noticed
    an expensive divide was done in tg3_poll().

    I am using gcc-4.1.1, so the following comment from drivers/net/tg3.c seems
    over-optimistic :

    /* Do not place this n-ring entries value into the tp struct itself,
    * we really want to expose these constants to GCC so that modulo et
    * al. operations are done with shifts and masks instead of with
    * hw multiply/modulo instructions. Another solution would be to
    * replace things like '% foo' with '& (foo - 1)'.
    */
    #define TG3_RX_RCB_RING_SIZE(tp) \
    ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) ? 512 : 1024)

    Assembly code before patch :
    (oprofile results included)
    6434 0.0088 :ffffffff803684b9: mov 0x6f0(%r15),%eax
    587 8.0e-04 :ffffffff803684c0: and $0x40000,%eax
    2170 0.0030 :ffffffff803684c5: cmp $0x1,%eax
    :ffffffff803684c8: lea 0x1(%r13),%eax
    :ffffffff803684cc: sbb %ecx,%ecx
    2051 0.0028 :ffffffff803684ce: xor %edx,%edx
    :ffffffff803684d0: and $0x200,%ecx
    20 2.7e-05 :ffffffff803684d6: add $0x200,%ecx
    1986 0.0027 :ffffffff803684dc: div %ecx
    103427 0.1410 :ffffffff803684de: cmp %edx,0xffffffffffffff7c(%rbp)

    Assembly code after the suggested patch :

    ffffffff803684b9: mov 0x6f0(%r15),%eax
    ffffffff803684c0: and $0x40000,%eax
    ffffffff803684c5: cmp $0x1,%eax
    ffffffff803684c8: sbb %eax,%eax
    ffffffff803684ca: inc %r13d
    ffffffff803684cd: and $0x200,%eax
    ffffffff803684d2: add $0x1ff,%eax
    ffffffff803684d7: and %eax,%r13d
    ffffffff803684da: cmp %r13d,0xffffffffffffff7c(%rbp)

    Signed-off-by: Eric Dumazet
    Acked-by: Michael Chan
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • net/dccp/ccids/ccid3.c: In function `ccid3_hc_rx_packet_recv':
    net/dccp/ccids/ccid3.c:1007: warning: long int format, different type arg (arg 3)
    net/dccp/ccids/ccid3.c:1007: warning: long int format, different type arg (arg 4)

    opaque types must be suitably cast for printing.

    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton
     
  • This patch replace kmalloc() + memset() pairs with the appropriate
    kzalloc().

    Signed-off-by: Joe Jin
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Joe Jin
     
  • This patch contains the following cleanups:
    - make the following needlessly global functions static:
    - lock_adapter_irq()
    - unlock_adapter_irq()
    - #if 0 the following unused global functions:
    - wanrouter_encapsulate()
    - wanrouter_type_trans()

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Adrian Bunk
     
  • This was reported by Ingo Molnar here,

    http://lkml.org/lkml/2006/12/18/119

    The problem is that adummy_init() depends on atm_init() , but adummy_init()
    is called first.

    So I put atm_init() into subsys_initcall which seems appropriate, and it
    will still get module_init() if it becomes a module.

    Interesting to note that you could crash your system here if you just load
    the modules in the wrong order.

    Signed-off-by: Daniel Walker
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Daniel Walker
     
  • This patch introduces users of the round_jiffies() function in the
    networking code.

    These timers all were of the "about once a second" or "about once
    every X seconds" variety and several showed up in the "what wakes the
    cpu up" profiles that the tickless patches provide. Some timers are
    highly dynamic based on network load; but even on low activity systems
    they still show up so the rounding is done only in cases of low
    activity, allowing higher frequency timers in the high activity case.

    The various hardware watchdogs are an obvious case; they run every 2
    seconds but aren't otherwise specific of exactly when they need to
    run.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Arjan van de Ven
     
  • Signed-off-by: John Heffner
    Signed-off-by: David S. Miller

    John Heffner
     
  • We clear the unused parts of the SACK cache, This prevents us from mistakenly
    taking the cache data if the old data in the SACK cache is the same as the data
    in the SACK block. This assumes that we never receive an empty SACK block with
    start and end both at zero.

    Signed-off-by: Baruch Even
    Signed-off-by: David S. Miller

    Baruch Even
     
  • Move DSACK code outside the SACK fast-path checking code. If the DSACK
    determined that the information was too old we stayed with a partial cache
    copied. Most likely this matters very little since the next packet will not be
    DSACK and we will find it in the cache. but it's still not good form and there
    is little reason to couple the two checks.

    Since the SACK receive cache doesn't need the data to be in host order we also
    remove the ntohl in the checking loop.

    Signed-off-by: Baruch Even
    Signed-off-by: David S. Miller

    Baruch Even
     
  • Only advance the SACK fast-path pointer for the first block, the
    fast-path assumes that only the first block advances next time so we
    should not move the cached skb for the next sack blocks.

    Signed-off-by: Baruch Even
    Signed-off-by: David S. Miller

    Baruch Even
     
  • Both aux data and sockaddr tries to use the same buffer which
    obviously doesn't work. We just happen to have 4 bytes free in
    the skb->cb if you take away the maximum length of sockaddr_ll.
    That's just enough to store the one piece of info from aux data
    that we can't generate at recvmsg(2) time.

    This is what the following patch does.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • This patch is needed to make ISC's DHCP server (and probably other
    DHCP servers/clients using AF_PACKET) to be able to serve another
    client on the same Xen host.

    The problem is that packets between different domains on the same
    Xen host only have partial checksums. Unfortunately this piece of
    information is not passed along in AF_PACKET unless you're using
    the mmap interface. Since dhcpd doesn't support packet-mmap, UDP
    packets from the same host come out with apparently bogus checksums.

    This patch adds a mechanism for AF_PACKET recvmsg(2) to return the
    status along with the packet. It does so by adding a new cmsg that
    contains this information along with some other relevant data such
    as the original packet length.

    I didn't include the time stamp information since there is already
    a cmsg for that.

    This patch also changes the mmap code to set the CSUMNOTREADY flag
    on all packets instead of just outoing packets on cooked sockets.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Do this even for non-blocking sockets. This avoids the silly -EAGAIN
    that applications can see now, even for non-blocking sockets in some
    cases (f.e. connect()).

    With help from Venkat Tekkirala.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The tcphdr struct passed to tcp_v4_check is not used, the following
    patch removes it from the parameter list.

    This adds the netfilter modifications missing in the patch I sent
    for rc3-mm1.

    Signed-off-by: Frederik Deweerdt
    Signed-off-by: David S. Miller

    Frederik Deweerdt
     
  • With help from Wei Dong .

    Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    YOSHIFUJI Hideaki
     
  • Currently netlink users BUG when the allocated skb for an event
    notification is undersized. While this is certainly a kernel bug,
    its not critical and crashing the kernel is too drastic, especially
    when considering that these errors have appeared multiple times in
    the past and it BUGs even if no listeners are present.

    This patch replaces BUG by WARN_ON and changes the notification
    functions to inform potential listeners of undersized allocations
    using a unique error code (EMSGSIZE).

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • This patch adds a dump_stats callback to enable
    printing of basic statistics of prio classes.
    (With help of Patrick McHardy).

    Signed-off-by: Jarek Poplawski
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/mfasheh/ocfs2: (22 commits)
    configfs: Zero terminate data in configfs attribute writes.
    [PATCH] ocfs2 heartbeat: clean up bio submission code
    ocfs2: introduce sc->sc_send_lock to protect outbound outbound messages
    [PATCH] ocfs2: drop INET from Kconfig, not needed
    ocfs2_dlm: Add timeout to dlm join domain
    ocfs2_dlm: Silence some messages during join domain
    ocfs2_dlm: disallow a domain join if node maps mismatch
    ocfs2_dlm: Ensure correct ordering of set/clear refmap bit on lockres
    ocfs2: Binds listener to the configured ip address
    ocfs2_dlm: Calling post handler function in assert master handler
    ocfs2: Added post handler callable function in o2net message handler
    ocfs2_dlm: Cookies in locks not being printed correctly in error messages
    ocfs2_dlm: Silence a failed convert
    ocfs2_dlm: wake up sleepers on the lockres waitqueue
    ocfs2_dlm: Dlm dispatch was stopping too early
    ocfs2_dlm: Drop inflight refmap even if no locks found on the lockres
    ocfs2_dlm: Flush dlm workqueue before starting to migrate
    ocfs2_dlm: Fix migrate lockres handler queue scanning
    ocfs2_dlm: Make dlmunlock() wait for migration to complete
    ocfs2_dlm: Fixes race between migrate and dirty
    ...

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
    Revert "Driver core: convert SPI code to use struct device"

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc: (116 commits)
    [POWERPC] Add export of vgacon_remap_base
    [POWERPC] Remove bogus comment about page_is_ram
    [POWERPC] windfarm: don't die on suspend thread signal
    [POWERPC] Fix comment in kernel/irq.c
    [POWERPC] ppc: Fix booke watchdog initialization
    [POWERPC] PPC: Use ARRAY_SIZE macro when appropriate
    [POWERPC] Use ARRAY_SIZE macro when appropriate
    [POWERPC] Fix ppc64's writing to struct file_operations
    [POWERPC] ppc: use syslog macro for the printk log level
    [POWERPC] ppc: cs4218_tdm remove extra brace
    [POWERPC] Add mpc52xx/lite5200 PCI support
    [POWERPC] Only use H_BULK_REMOVE if the firmware supports it
    [POWERPC] Fixup error handling when emulating a floating point instruction
    [POWERPC] Enable interrupts if we are doing fp math emulation
    [POWERPC] Added kprobes support to ppc32
    [POWERPC] Make pSeries use the H_BULK_REMOVE hypervisor call
    [POWERPC] Clear RI bit in MSR before restoring r13 when returning to userspace
    [POWERPC] Fix performance monitor exception
    [POWERPC] Compile fixes for arch/powerpc dcr code
    [POWERPC] Maple: use mmio nvram
    ...

    Linus Torvalds
     
  • * 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm: Allow for 44 bit user-tokens (or drm_file offsets)
    drm/via: Disable AGP DMA for chips with the new 3D engine.
    drm: update core memory manager from git drm tree
    drm: remove drm_ioremap and drm_ioremapfree
    i810/i830: use drm_core_ioremap instead of drm_ioremap
    drm: use vmalloc_user instead of vmalloc_32 for DRM_SHM
    via: allow for npot texture pitch alignment
    via: add some new chipsets
    via: some PCI posting flushes

    Linus Torvalds
     
  • Michal Ostrowski points out what the real problem was: the spaces at the
    start of the definition of the 'checker-shell' make function.

    Cc: Michal Ostrowski
    Acked-by: David Miller
    Acked-by: Geert Uytterhoeven
    Acked-by: Oleg Verych
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

08 Feb, 2007

8 commits