Skip to content
  1. Sep 24, 2015
  2. Sep 23, 2015
    • Andrzej Hajda's avatar
      usbnet: remove invalid check · 227b9e87
      Andrzej Hajda authored
      
      
      skb->len is always non-negative.
      
      The problem has been detected using proposed semantic patch
      scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
      
      [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
      
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      227b9e87
    • Andrzej Hajda's avatar
      rndis_wlan: fix checking for default value · 7e724da6
      Andrzej Hajda authored
      
      
      Thresholds uses -1 to indicate that default value should be used.
      Since thresholds are unsigned sign checking makes no sense.
      
      The problem has been detected using proposed semantic patch
      scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
      
      [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
      
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7e724da6
    • Andrzej Hajda's avatar
      orinoco: fix checking for default value · e79dd09b
      Andrzej Hajda authored
      
      
      Thresholds uses -1 to indicate that default value should be used.
      Since thresholds are unsigned sign checking makes no sense.
      
      The problem has been detected using proposed semantic patch
      scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
      
      [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
      
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e79dd09b
    • Andrzej Hajda's avatar
      mwifiex: fix comparison expression · cc751498
      Andrzej Hajda authored
      
      
      To avoid underflows signed variables should be used in expression.
      
      The problem has been detected using proposed semantic patch
      scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
      
      [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
      
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Acked-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc751498
    • Andrzej Hajda's avatar
      net: brcm80211: fix range check · 94926121
      Andrzej Hajda authored
      
      
      Unsigned minus constant is still unsigned so checking its sign makes no
      sense.
      
      The problem has been detected using proposed semantic patch
      scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
      
      [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
      
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94926121
    • Andrzej Hajda's avatar
      net: stmmac: fix type of entry variable · 23c2412d
      Andrzej Hajda authored
      
      
      Variable can store negative values.
      
      The problem has been detected using proposed semantic patch
      scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
      
      [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
      
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      23c2412d
    • Andrzej Hajda's avatar
      net/ibm/emac: fix type of phy_mode · 7d2fa710
      Andrzej Hajda authored
      
      
      phy_mode can be negative.
      
      The problem has been detected using proposed semantic patch
      scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
      
      [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
      
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d2fa710
    • Andrzej Hajda's avatar
      isdn: hisax: fix frame calculation · 8f89642f
      Andrzej Hajda authored
      
      
      Difference of unsigned values is also unsigned so it does not make
      sense to check its sign.
      
      The problem has been detected using proposed semantic patch
      scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
      
      [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
      
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f89642f
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 99cb99aa
      David S. Miller authored
      
      
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter/IPVS updates for net-next
      
      The following patchset contains Netfilter/IPVS updates for your net-next tree
      in this 4.4 development cycle, they are:
      
      1) Schedule ICMP traffic to IPVS instances, this introduces a new schedule_icmp
         proc knob to enable/disable it. By default is off to retain the old
         behaviour. Patchset from Alex Gartrell.
      
      I'm also including what Alex originally said for the record:
      
      "The configuration of ipvs at Facebook is relatively straightforward.  All
      ipvs instances bgp advertise a set of VIPs and the network prefers the
      nearest one or uses ECMP in the event of a tie.  For the uninitiated, ECMP
      deterministically and statelessly load balances by hashing the packet
      (usually a 5-tuple of protocol, saddr, daddr, sport, and dport) and using
      that number as an index (basic hash table type logic).
      
      The problem is that ICMP packets (which contain really important
      information like whether or not an MTU has been exceeded) will get a
      different hash value and may end up at a different ipvs instance.  With no
      information about where to route these packets, they are dropped, creating
      ICMP black holes and breaking Path MTU discovery.  Suddenly, my mom's
      pictures can't load and I'm fielding midday calls that I want nothing to do
      with.
      
      To address this, this patch set introduces the ability to schedule icmp
      packets which is gated by a sysctl net.ipv4.vs.schedule_icmp.  If set to 0,
      the old behavior is maintained -- otherwise ICMP packets are scheduled."
      
      2) Add another proc entry to ignore tunneled packets to avoid routing loops
         from IPVS, also from Alex.
      
      3) Fifteen patches from Eric Biederman to:
      
      * Stop passing nf_hook_ops as parameter to the hook and use the state hook
        object instead all around the netfilter code, so only the private data
        pointer is passed to the registered hook function.
      
      * Now that we've got state->net, propagate the netns pointer to netfilter hook
        clients to avoid its computation over and over again. A good example of how
        this has been simplified is the former TEE target (now nf_dup infrastructure)
        since it has killed the ugly pick_net() function.
      
      There's another round of netns updates from Eric Biederman making the line. To
      avoid the patchbomb again to almost all the networking mailing list (that is 84
      patches) I'd suggest we send you a pull request with no patches or let me know
      if you prefer a better way.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      99cb99aa
  3. Sep 22, 2015
  4. Sep 21, 2015