1. 12 3月, 2009 11 次提交
  2. 11 3月, 2009 1 次提交
    • T
      SUNRPC: Tighten up the task locking rules in __rpc_execute() · eb9b55ab
      Trond Myklebust 提交于
      We should probably not be testing any flags after we've cleared the
      RPC_TASK_RUNNING flag, since rpc_make_runnable() is then free to assign the
      rpc_task to another workqueue, which may then destroy it.
      
      We can fix any races with rpc_make_runnable() by ensuring that we only
      clear the RPC_TASK_RUNNING flag while holding the rpc_wait_queue->lock that
      the task is supposed to be sleeping on (and then checking whether or not
      the task really is sleeping).
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      eb9b55ab
  3. 07 3月, 2009 1 次提交
  4. 05 3月, 2009 3 次提交
  5. 04 3月, 2009 4 次提交
  6. 03 3月, 2009 8 次提交
  7. 01 3月, 2009 2 次提交
    • I
      tcp: fix retrans_out leaks · 9ec06ff5
      Ilpo Järvinen 提交于
      There's conflicting assumptions in shifting, the caller assumes
      that dupsack results in S'ed skbs (or a part of it) for sure but
      never gave a hint to tcp_sacktag_one when dsack is actually in
      use. Thus DSACK retrans_out -= pcount was not taken and the
      counter became out of sync. Remove obstacle from that information
      flow to get DSACKs accounted in tcp_sacktag_one as expected.
      Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Tested-by: NDenys Fedoryshchenko <denys@visp.net.lb>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9ec06ff5
    • H
      netpoll: Add drop checks to all entry points · 4ead4431
      Herbert Xu 提交于
      The netpoll entry checks are required to ensure that we don't
      receive normal packets when invoked via netpoll.  Unfortunately
      it only ever worked for the netif_receive_skb/netif_rx entry
      points.  The VLAN (and subsequently GRO) entry point didn't
      have the check and therefore can trigger all sorts of weird
      problems.
      
      This patch adds the netpoll check to all entry points.
      
      I'm still uneasy with receiving at all under netpoll (which
      apparently is only used by the out-of-tree kdump code).  The
      reason is it is perfectly legal to receive all data including
      headers into highmem if netpoll is off, but if you try to do
      that with netpoll on and someone gets a printk in an IRQ handler                                             
      you're going to get a nice BUG_ON.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4ead4431
  8. 27 2月, 2009 1 次提交
  9. 26 2月, 2009 1 次提交
  10. 25 2月, 2009 1 次提交
  11. 24 2月, 2009 3 次提交
    • J
      netfilter: xt_recent: fix proc-file addition/removal of IPv4 addresses · 325fb5b4
      Josef Drexler 提交于
      Fix regression introduded by commit 079aa88f (netfilter: xt_recent: IPv6 support):
      
      From http://bugzilla.kernel.org/show_bug.cgi?id=12753:
      
      Problem Description:
      An uninitialized buffer causes IPv4 addresses added manually (via the +IP
      command to the proc interface) to never match any packets. Similarly, the -IP
      command fails to remove IPv4 addresses.
      
      Details:
      In the function recent_entry_lookup, the xt_recent module does comparisons of
      the entire nf_inet_addr union value, both for IPv4 and IPv6 addresses. For
      addresses initialized from actual packets the remaining 12 bytes not occupied
      by the IPv4 are zeroed so this works correctly. However when setting the
      nf_inet_addr addr variable in the recent_mt_proc_write function, only the IPv4
      bytes are initialized and the remaining 12 bytes contain garbage.
      
      Hence addresses added in this way never match any packets, unless these
      uninitialized 12 bytes happened to be zero by coincidence. Similarly, addresses
      cannot consistently be removed using the proc interface due to mismatch of the
      garbage bytes (although it will sometimes work to remove an address that was
      added manually).
      
      Reading the /proc/net/xt_recent/ entries hides this problem because this only
      uses the first 4 bytes when displaying IPv4 addresses.
      
      Steps to reproduce:
      $ iptables -I INPUT -m recent --rcheck -j LOG
      $ echo +169.254.156.239 > /proc/net/xt_recent/DEFAULT
      $ cat /proc/net/xt_recent/DEFAULT
      src=169.254.156.239 ttl: 0 last_seen: 119910 oldest_pkt: 1 119910
      
      [At this point no packets from 169.254.156.239 are being logged.]
      
      $ iptables -I INPUT -s 169.254.156.239 -m recent --set
      $ cat /proc/net/xt_recent/DEFAULT
      src=169.254.156.239 ttl: 0 last_seen: 119910 oldest_pkt: 1 119910
      src=169.254.156.239 ttl: 255 last_seen: 126184 oldest_pkt: 4 125434, 125684, 125934, 126184
      
      [At this point, adding the address via an iptables rule, packets are being
      logged correctly.]
      
      $ echo -169.254.156.239 > /proc/net/xt_recent/DEFAULT
      $ cat /proc/net/xt_recent/DEFAULT
      src=169.254.156.239 ttl: 0 last_seen: 119910 oldest_pkt: 1 119910
      src=169.254.156.239 ttl: 255 last_seen: 126992 oldest_pkt: 10 125434, 125684, 125934, 126184, 126434, 126684, 126934, 126991, 126991, 126992
      $ echo -169.254.156.239 > /proc/net/xt_recent/DEFAULT
      $ cat /proc/net/xt_recent/DEFAULT
      src=169.254.156.239 ttl: 0 last_seen: 119910 oldest_pkt: 1 119910
      src=169.254.156.239 ttl: 255 last_seen: 126992 oldest_pkt: 10 125434, 125684, 125934, 126184, 126434, 126684, 126934, 126991, 126991, 126992
      
      [Removing the address via /proc interface failed evidently.]
      
      Possible solutions:
      - initialize the addr variable in recent_mt_proc_write
      - compare only 4 bytes for IPv4 addresses in recent_entry_lookup
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      325fb5b4
    • E
      net: amend the fix for SO_BSDCOMPAT gsopt infoleak · 50fee1de
      Eugene Teo 提交于
      The fix for CVE-2009-0676 (upstream commit df0bca04) is incomplete. Note
      that the same problem of leaking kernel memory will reappear if someone
      on some architecture uses struct timeval with some internal padding (for
      example tv_sec 64-bit and tv_usec 32-bit) --- then, you are going to
      leak the padded bytes to userspace.
      Signed-off-by: NEugene Teo <eugeneteo@kernel.sg>
      Reported-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      50fee1de
    • C
      netns: build fix for net_alloc_generic · ebe47d47
      Clemens Noss 提交于
      net_alloc_generic was defined in #ifdef CONFIG_NET_NS, but used
      unconditionally. Move net_alloc_generic out of #ifdef.
      Signed-off-by: NClemens Noss <cnoss@gmx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ebe47d47
  12. 23 2月, 2009 1 次提交
    • P
      cipso: Fix documentation comment · 586c2500
      Paul Moore 提交于
      The CIPSO protocol engine incorrectly stated that the FIPS-188 specification
      could be found in the kernel's Documentation directory.  This patch corrects
      that by removing the comment and directing users to the FIPS-188 documented
      hosted online.  For the sake of completeness I've also included a link to the
      CIPSO draft specification on the NetLabel website.
      
      Thanks to Randy Dunlap for spotting the error and letting me know.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      586c2500
  13. 22 2月, 2009 1 次提交
    • D
      netns: fix double free at netns creation · 486a87f1
      Daniel Lezcano 提交于
      This patch fix a double free when a network namespace fails.
      The previous code does a kfree of the net_generic structure when
      one of the init subsystem initialization fails.
      The 'setup_net' function does kfree(ng) and returns an error.
      The caller, 'copy_net_ns', call net_free on error, and this one
      calls kfree(net->gen), making this pointer freed twice.
      
      This patch make the code symetric, the net_alloc does the net_generic
      allocation and the net_free frees the net_generic.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@free.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      486a87f1
  14. 19 2月, 2009 1 次提交
  15. 18 2月, 2009 1 次提交