1. 11 1月, 2008 20 次提交
  2. 10 1月, 2008 3 次提交
    • F
      [SCSI] qla1280: fix 32 bit segment code · 3a43e69c
      FUJITA Tomonori 提交于
      There's an error remaining in the 32 bit descriptor code after the
      conversion to dma accessors:  req_cnt is left uninitialised.
      
      qla1280_32bit_start_scsi gives the following warnings:
      
      drivers/scsi/qla1280.c: In function 'qla1280_32bit_start_scsi':
      drivers/scsi/qla1280.c:3044: warning: unused variable 'dma_handle'
      drivers/scsi/qla1280.c: In function 'qla1280_queuecommand':
      drivers/scsi/qla1280.c:3060: warning: 'req_cnt' is used uninitialized in this function
      drivers/scsi/qla1280.c:3042: note: 'req_cnt' was declared here
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      3a43e69c
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · fd0b45df
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (36 commits)
        [ATM]: Check IP header validity in mpc_send_packet
        [IPV6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()
        [CONNECTOR]: Don't touch queue dev after decrement of ref count.
        [SOCK]: Adds a rcu_dereference() in sk_filter
        [XFRM]: xfrm_algo_clone() allocates too much memory
        [FORCEDETH]: Fix reversing the MAC address on suspend.
        [NET]: mcs7830 passes msecs instead of jiffies to usb_control_msg
        [LRO] Fix lro_mgr->features checks
        [NET]: Clone the sk_buff 'iif' field in __skb_clone()
        [IPV4] ROUTE: ip_rt_dump() is unecessary slow
        [NET]: kaweth was forgotten in msec switchover of usb_start_wait_urb
        [NET] Intel ethernet drivers: update MAINTAINERS
        [NET]: Make ->poll() breakout consistent in Intel ethernet drivers.
        [NET]: Stop polling when napi_disable() is pending.
        [NET]: Fix drivers to handle napi_disable() disabling interrupts.
        [NETXEN]: Fix ->poll() done logic.
        mac80211: return an error when SIWRATE doesn't match any rate
        ssb: Fix probing of PCI cores if PCI and PCIE core is available
        [NET]: Do not check netif_running() and carrier state in ->poll()
        [NET]: Add NAPI_STATE_DISABLE.
        ...
      fd0b45df
    • R
      show_task: real_parent · fcfd50af
      Roland McGrath 提交于
      The show_task function invoked by sysrq-t et al displays the
      pid and parent's pid of each task.  It seems more useful to
      show the actual process hierarchy here than who is using
      ptrace on each process.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fcfd50af
  3. 09 1月, 2008 17 次提交
    • H
      [ATM]: Check IP header validity in mpc_send_packet · 1c9b7aa1
      Herbert Xu 提交于
      Al went through the ip_fast_csum callers and found this piece of code
      that did not validate the IP header.  While root crashing the machine
      by sending bogus packets through raw or AF_PACKET sockets isn't that
      serious, it is still nice to react gracefully.
      
      This patch ensures that the skb has enough data for an IP header and
      that the header length field is valid.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1c9b7aa1
    • B
    • L
      [CONNECTOR]: Don't touch queue dev after decrement of ref count. · cf585ae8
      Li Zefan 提交于
      cn_queue_free_callback() will touch 'dev'(i.e. cbq->pdev), so it
      should be called before atomic_dec(&dev->refcnt).
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cf585ae8
    • E
      [SOCK]: Adds a rcu_dereference() in sk_filter · 9d3e4442
      Eric Dumazet 提交于
      It seems commit fda9ef5d introduced a RCU 
      protection for sk_filter(), without a rcu_dereference()
      
      Either we need a rcu_dereference(), either a comment should explain why we 
      dont need it. I vote for the former.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9d3e4442
    • E
      [XFRM]: xfrm_algo_clone() allocates too much memory · 0f99be0d
      Eric Dumazet 提交于
      alg_key_len is the length in bits of the key, not in bytes.
      
      Best way to fix this is to move alg_len() function from net/xfrm/xfrm_user.c 
      to include/net/xfrm.h, and to use it in xfrm_algo_clone()
      
      alg_len() is renamed to xfrm_alg_len() because of its global exposition.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0f99be0d
    • B
      [FORCEDETH]: Fix reversing the MAC address on suspend. · 2e3884b5
      Björn Steinbrink 提交于
      For cards that initially have the MAC address stored in reverse order,
      the forcedeth driver uses a flag to signal whether the address was
      already corrected, so that it is not reversed again on a subsequent
      probe.
      
      Unfortunately this flag, which is stored in a register of the card,
      seems to get lost during suspend, resulting in the MAC address being
      reversed again. To fix that, the MAC address needs to be written back
      in reversed order before we suspend and the flag needs to be reset.
      
      The flag is still required because at least kexec will never write
      back the reversed address and thus needs to know what state the card
      is in.
      Signed-off-by: NBjörn Steinbrink <B.Steinbrink@gmx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e3884b5
    • R
      [NET]: mcs7830 passes msecs instead of jiffies to usb_control_msg · 1d39da3d
      Russ Dill 提交于
      usb_control_msg was changed long ago (2.6.12-pre) to take milliseconds
      instead of jiffies. Oddly, mcs7830 wasn't added until 2.6.19-rc3.
      Signed-off-by: NRuss Dill <Russ.Dill@asu.edu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d39da3d
    • B
      [LRO] Fix lro_mgr->features checks · 877364e6
      Brice Goglin 提交于
      lro_mgr->features contains a bitmask of LRO_F_* values which are
      defined as power of two, not as bit indexes.
      They must be checked with x&LRO_F_FOO, not with test_bit(LRO_F_FOO,&x).
      Signed-off-by: NBrice Goglin <Brice.Goglin@inria.fr>
      Acked-by: NAndrew Gallatin <gallatin@myri.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      877364e6
    • P
      [NET]: Clone the sk_buff 'iif' field in __skb_clone() · 02f1c89d
      Paul Moore 提交于
      Both NetLabel and SELinux (other LSMs may grow to use it as well) rely
      on the 'iif' field to determine the receiving network interface of
      inbound packets.  Unfortunately, at present this field is not
      preserved across a skb clone operation which can lead to garbage
      values if the cloned skb is sent back through the network stack.  This
      patch corrects this problem by properly copying the 'iif' field in
      __skb_clone() and removing the 'iif' field assignment from
      skb_act_clone() since it is no longer needed.
      
      Also, while we are here, put the assignments in the same order as the
      offsets to reduce cacheline bounces.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      02f1c89d
    • E
      [IPV4] ROUTE: ip_rt_dump() is unecessary slow · d8c92830
      Eric Dumazet 提交于
      I noticed "ip route list cache x.y.z.t" can be *very* slow.
      
      While strace-ing -T it I also noticed that first part of route cache
      is fetched quite fast :
      
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202
      GXm\0\0\2  \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3772 <0.000047>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\234\0\0\0\30\0\2\0\254i\
      202GXm\0\0\2  \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3736 <0.000042>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\
      202GXm\0\0\2  \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3740 <0.000055>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\234\0\0\0\30\0\2\0\254i\
      202GXm\0\0\2  \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3712 <0.000043>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\
      202GXm\0\0\2  \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3732 <0.000053>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202
      GXm\0\0\2  \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3708 <0.000052>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202
      GXm\0\0\2  \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3680 <0.000041>
      
      while the part at the end of the table is more expensive:
      
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3656 <0.003857>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3772 <0.003891>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3712 <0.003765>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3700 <0.003879>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3676 <0.003797>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3724 <0.003856>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\234\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3736 <0.003848>
      
      The following patch corrects this performance/latency problem,
      removing quadratic behavior.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d8c92830
    • R
      [NET]: kaweth was forgotten in msec switchover of usb_start_wait_urb · 2b2b2e35
      Russ Dill 提交于
      Back in 2.6.12-pre, usb_start_wait_urb was switched over to take
      milliseconds instead of jiffies. kaweth.c was never updated to match.
      Signed-off-by: NRuss Dill <Russ.Dill@asu.edu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b2b2e35
    • A
      [NET] Intel ethernet drivers: update MAINTAINERS · 20424659
      Auke Kok 提交于
      Unfortunately Jeb decided to move away from our group. We wish Jeb
      good luck with his new group!
      
      Reordered people a bit so most active team members are on top.
      Signed-off-by: NAuke Kok <auke-jan.h.kok@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      20424659
    • D
      [NET]: Make ->poll() breakout consistent in Intel ethernet drivers. · 53e52c72
      David S. Miller 提交于
      This makes the ->poll() routines of the E100, E1000, E1000E, IXGB, and
      IXGBE drivers complete ->poll() consistently.
      
      Now they will all break out when the amount of RX work done is less
      than 'budget'.
      
      At a later time, we may want put back code to include the TX work as
      well (as at least one other NAPI driver does, but by in large NAPI
      drivers do not do this).  But if so, it should be done consistently
      across the board to all of these drivers.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NAuke Kok <auke-jan.h.kok@intel.com>
      53e52c72
    • D
      [NET]: Stop polling when napi_disable() is pending. · fed17f30
      David S. Miller 提交于
      This finally adds the code in net_rx_action() to break out of the
      ->poll()'ing loop when a napi_disable() is found to be pending.
      
      Now, even if a device is being flooded with packets it can be cleanly
      brought down.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fed17f30
    • D
      [NET]: Fix drivers to handle napi_disable() disabling interrupts. · d1d08d12
      David S. Miller 提交于
      When we add the generic napi_disable_pending() breakout
      logic to net_rx_action() it means that napi_disable()
      can cause NAPI poll interrupt events to be disabled.
      
      And this is exactly what we want.  If a napi_disable()
      is pending, and we are looping in the ->poll(), we want
      ->poll() event interrupts to stay disabled and we want
      to complete the NAPI poll ASAP.
      
      When ->poll() break out during device down was being handled on a
      per-driver basis, often these drivers would turn interrupts back on
      when '!netif_running()' was detected.
      
      And this would just cause a reschedule of the NAPI ->poll() in the
      interrupt handler before the napi_disable() could get in there and
      grab the NAPI_STATE_SCHED bit.
      
      The vast majority of drivers don't care if napi_disable() might have
      the side effect of disabling NAPI ->poll() event interrupts.  In all
      such cases, when a napi_disable() is performed, the driver just
      disabled interrupts or is about to.
      
      However there were three exceptions to this in PCNET32, R8169, and
      SKY2.  To fix those cases, at the subsequent napi_enable() points, I
      added code to ensure that the ->poll() interrupt events are enabled in
      the hardware.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NDon Fry <pcnet32@verizon.net>
      d1d08d12
    • D
      [NETXEN]: Fix ->poll() done logic. · 1706287f
      David S. Miller 提交于
      If work_done >= budget we should always elide the NAPI
      completion.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1706287f
    • A
      mac80211: return an error when SIWRATE doesn't match any rate · 5cdfed54
      Andrew Lutomirski 提交于
      Currently mac80211 fails silently when trying to set a nonexistent
      rate.  Return an error instead.
      Signed-Off-By: NAndy Lutomirski <luto@myrealbox.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5cdfed54