1. 05 Feb, 2008 11 commits
    • Andrew Morton's avatar
      bluetooth: uninlining · 91f5cca3
      Andrew Morton authored
      Remove all those inlines which were either a) unneeded or b) increased code
      size.
      
                text    data     bss     dec     hex filename
      before:   6997      74       8    7079    1ba7 net/bluetooth/hidp/core.o
      after:    6492      74       8    6574    19ae net/bluetooth/hidp/core.o
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      91f5cca3
    • Dave Young's avatar
      bluetooth: hidp_process_hid_control remove unnecessary parameter dealing · eff001e3
      Dave Young authored
      According to the bluetooth HID spec v1.0 chapter 7.4.2
      
      "This code requests a major state change in a BT-HID device.  A HID_CONTROL
      request does not generate a HANDSHAKE response."
      
      "A HID_CONTROL packet with a parameter of VIRTUAL_CABLE_UNPLUG is the only
      HID_CONTROL packet a device can send to a host.  A host will ignore all other
      packets."
      
      So in the hidp_precess_hid_control function, we just need to deal with the
      UNLUG packet.
      Signed-off-by: default avatarDave Young <hidave.darkstar@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eff001e3
    • Nathaniel Filardo's avatar
      tun: impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI · a26af1e0
      Nathaniel Filardo authored
      From: "Nathaniel Filardo" <nwfilardo@gmail.com>
      
      Taken from http://bugzilla.kernel.org/show_bug.cgi?id=9806
      
      The TUN/TAP driver only permits one-way transitions of IFF_NO_PI or
      IFF_ONE_QUEUE during the lifetime of a tap/tun interface.  Note that
      tun_set_iff contains
      
       541         if (ifr->ifr_flags & IFF_NO_PI)
       542                 tun->flags |= TUN_NO_PI;
       543 
       544         if (ifr->ifr_flags & IFF_ONE_QUEUE)
       545                 tun->flags |= TUN_ONE_QUEUE;
      
      This is easily fixed by adding else branches which clear these bits.
      
      Steps to reproduce:
      
      This is easily reproduced by setting an interface persistant using tunctl then
      attempting to open it as IFF_TAP or IFF_TUN, without asserting the IFF_NO_PI
      flag.  The ioctl() will succeed and the ifr.flags word is not modified, but the
      interface remains in IFF_NO_PI mode (as it was set by tunctl).
      Acked-by: default avatarMaxim Krasnyansky <maxk@qualcomm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a26af1e0
    • Randy Dunlap's avatar
      hamradio: fix dmascc section mismatch · cd8d627a
      Randy Dunlap authored
      hw[] is used in both init and exit functions so it cannot be initdata (section
      mismatch is when CONFIG_MODULES=n and CONFIG_DMASCC=y).
      
      WARNING: vmlinux.o(.exit.text+0xba7): Section mismatch: reference to .init.data: (between 'dmascc_exit' and 'sixpack_exit_driver')
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Klaus Kudielka <klaus.kudielka@gmx.net>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd8d627a
    • Wei Yongjun's avatar
      [SCTP]: Fix kernel panic while received AUTH chunk with BAD shared key identifier · 7cc08b55
      Wei Yongjun authored
      If SCTP-AUTH is enabled, received AUTH chunk with BAD shared key 
      identifier will cause kernel panic.
      
      Test as following:
      step1: enabled /proc/sys/net/sctp/auth_enable
      step 2:  connect  to SCTP server with auth capable. Association is 
      established between endpoints. Then send a AUTH chunk with a bad 
      shareid, SCTP server will kernel panic after received that AUTH chunk.
      
      SCTP client                   SCTP server
        INIT         ---------->  
          (with auth capable)
                     <----------    INIT-ACK
                                    (with auth capable)
        COOKIE-ECHO  ---------->
                     <----------    COOKIE-ACK
        AUTH         ---------->
      
      
      AUTH chunk is like this:
        AUTH chunk
          Chunk type: AUTH (15)
          Chunk flags: 0x00
          Chunk length: 28
          Shared key identifier: 10
          HMAC identifier: SHA-1 (1)
          HMAC: 0000000000000000000000000000000000000000
      
      The assignment of NULL to key can safely be removed, since key_for_each 
      (which is just list_for_each_entry under the covers does an initial 
      assignment to key anyway).
      
      If the endpoint_shared_keys list is empty, or if the key_id being 
      requested does not exist, the function as it currently stands returns 
      the actuall list_head (in this case endpoint_shared_keys.  Since that 
      list_head isn't surrounded by an actuall data structure, the last 
      iteration through list_for_each_entry will do a container_of on key, and 
      we wind up returning a bogus pointer, instead of NULL, as we should.
      
      > Neil Horman wrote:
      >> On Tue, Jan 22, 2008 at 05:29:20PM +0900, Wei Yongjun wrote:
      >>
      >> FWIW, Ack from me.  The assignment of NULL to key can safely be 
      >> removed, since
      >> key_for_each (which is just list_for_each_entry under the covers does 
      >> an initial
      >> assignment to key anyway).
      >> If the endpoint_shared_keys list is empty, or if the key_id being 
      >> requested does
      >> not exist, the function as it currently stands returns the actuall 
      >> list_head (in
      >> this case endpoint_shared_keys.  Since that list_head isn't 
      >> surrounded by an
      >> actuall data structure, the last iteration through 
      >> list_for_each_entry will do a
      >> container_of on key, and we wind up returning a bogus pointer, 
      >> instead of NULL,
      >> as we should.  Wei's patch corrects that.
      >>
      >> Regards
      >> Neil
      >>
      >> Acked-by: Neil Horman <nhorman@tuxdriver.com>
      >>
      >
      > Yep, the patch is correct.
      >
      > Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
      >
      > -vlad
      >
      Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Acked-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7cc08b55
    • Wei Yongjun's avatar
      [SCTP]: Fix kernel panic while received AUTH chunk while enabled auth · d2f19fa1
      Wei Yongjun authored
      If STCP is started while /proc/sys/net/sctp/auth_enable is set 0 and
      association is established between endpoints. Then if
      /proc/sys/net/sctp/auth_enable is set 1, a received AUTH chunk will
      cause kernel panic.
      
      Test as following:
      step 1: echo 0> /proc/sys/net/sctp/auth_enable
      step 2:
      
         SCTP client                  SCTP server
            INIT          --------->
                          <---------   INIT-ACK
            COOKIE-ECHO   --------->
                          <---------   COOKIE-ACK
      step 3:
          echo 1> /proc/sys/net/sctp/auth_enable
      step 4:
         SCTP client                  SCTP server
             AUTH        ----------->  Kernel Panic
      
      
      This patch fix this probleam to treat AUTH chunk as unknow chunk if peer 
      has initialized with no auth capable.
      
      > Sorry for the delay.  Was on vacation without net access.
      >
      > Wei Yongjun wrote:
      >>
      >>
      >> This patch fix this probleam to treat AUTH chunk as unknow chunk if 
      >> peer has initialized with no auth capable.
      >>
      >> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
      >
      > Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
      >
      >>
      Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
      Acked-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d2f19fa1
    • Denis V. Lunev's avatar
      [IPV4]: Formatting fix for /proc/net/fib_trie. · b9c4d82a
      Denis V. Lunev authored
      The line in the /proc/net/fib_trie for route with TOS specified
      - has extra \n at the end
      - does not have a space after route scope
      like below.
                 |-- 1.1.1.1
                    /32 universe UNICASTtos =1
      Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b9c4d82a
    • Daniel Lezcano's avatar
      [IPV6]: Fix sysctl compilation error. · 6de1a910
      Daniel Lezcano authored
      Move ipv6_icmp_sysctl_init and ipv6_route_sysctl_init into the right
      ifdef section otherwise that does not compile when CONFIG_SYSCTL=yes
      and CONFIG_PROC_FS=no
      Signed-off-by: default avatarDaniel Lezcano <dlezcano@fr.ibm.com>
      Acked-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6de1a910
    • Rami Rosen's avatar
      [NET_SCHED]: Add #ifdef CONFIG_NET_EMATCH in net/sched/cls_flow.c (latest git broken build) · 0aead543
      Rami Rosen authored
      The 2.6 latest git build was broken when using the following
      configuration options:
      CONFIG_NET_EMATCH=n
      CONFIG_NET_CLS_FLOW=y
      
      with the following error:
      net/sched/cls_flow.c: In function 'flow_dump':
      net/sched/cls_flow.c:598: error: 'struct tcf_ematch_tree' has no
      member named 'hdr'
      make[2]: *** [net/sched/cls_flow.o] Error 1
      make[1]: *** [net/sched] Error 2
      make: *** [net] Error 2
      
      
      see the recent post by Li Zefan:
        http://www.spinics.net/lists/netdev/msg54434.html
      
      The reason for this crash is that struct tcf_ematch_tree
      (net/pkt_cls.h) is empty when CONFIG_NET_EMATCH is not defined.
      
      When CONFIG_NET_EMATCH is defined, the tcf_ematch_tree structure
      indeed holds a struct tcf_ematch_tree_hdr (hdr) as flow_dump()
      expects.
      
      This patch adds #ifdef CONFIG_NET_EMATCH in flow_dump to avoid this.
      Signed-off-by: default avatarRami Rosen <ramirose@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0aead543
    • Li Zefan's avatar
      [IPV4]: Fix compile error building without CONFIG_FS_PROC · cc8274f5
      Li Zefan authored
      compile error building without CONFIG_FS_PROC:
      
      net/ipv4/fib_frontend.c: In function 'fib_net_init':
      net/ipv4/fib_frontend.c:1032: error: implicit declaration of function 'fib_proc_
      init'
      net/ipv4/fib_frontend.c: In function 'fib_net_exit':
      net/ipv4/fib_frontend.c:1047: error: implicit declaration of function 'fib_proc_
      exit'
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc8274f5
    • Adrian Bunk's avatar
      [IPSEC] xfrm4_beet_input(): fix an if() · 322c8a3c
      Adrian Bunk authored
      A bug every C programmer makes at some point in time...
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      322c8a3c
  2. 04 Feb, 2008 29 commits