12 Nov, 2014

1 commit

  • Use the more common dynamic_debug capable net_dbg_ratelimited
    and remove the LIMIT_NETDEBUG macro.

    All messages are still ratelimited.

    Some KERN_ uses are changed to KERN_DEBUG.

    This may have some negative impact on messages that were
    emitted at KERN_INFO that are not not enabled at all unless
    DEBUG is defined or dynamic_debug is enabled. Even so,
    these messages are now _not_ emitted by default.

    This also eliminates the use of the net_msg_warn sysctl
    "/proc/sys/net/core/warnings". For backward compatibility,
    the sysctl is not removed, but it has no function. The extern
    declaration of net_msg_warn is removed from sock.h and made
    static in net/core/sysctl_net_core.c

    Miscellanea:

    o Update the sysctl documentation
    o Remove the embedded uses of pr_fmt
    o Coalesce format fragments
    o Realign arguments

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

16 Jul, 2014

1 commit

  • Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
    all users to pass NET_NAME_UNKNOWN.

    Coccinelle patch:

    @@
    expression sizeof_priv, name, setup, txqs, rxqs, count;
    @@

    (
    -alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
    +alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
    |
    -alloc_netdev_mq(sizeof_priv, name, setup, count)
    +alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
    |
    -alloc_netdev(sizeof_priv, name, setup)
    +alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
    )

    v9: move comments here from the wrong commit

    Signed-off-by: Tom Gundersen
    Reviewed-by: David Herrmann
    Signed-off-by: David S. Miller

    Tom Gundersen
     

12 Apr, 2014

1 commit

  • Several spots in the kernel perform a sequence like:

    skb_queue_tail(&sk->s_receive_queue, skb);
    sk->sk_data_ready(sk, skb->len);

    But at the moment we place the SKB onto the socket receive queue it
    can be consumed and freed up. So this skb->len access is potentially
    to freed up memory.

    Furthermore, the skb->len can be modified by the consumer so it is
    possible that the value isn't accurate.

    And finally, no actual implementation of this callback actually uses
    the length argument. And since nobody actually cared about it's
    value, lots of call sites pass arbitrary values in such as '0' and
    even '1'.

    So just remove the length argument from the callback, that way there
    is no confusion whatsoever and all of these use-after-free cases get
    fixed as a side effect.

    Based upon a patch by Eric Dumazet and his suggestion to audit this
    issue tree-wide.

    Signed-off-by: David S. Miller

    David S. Miller
     

18 Jun, 2012

1 commit


07 Jan, 2010

1 commit


01 Sep, 2009

1 commit


06 Jul, 2009

1 commit


09 Jun, 2009

1 commit


02 Jun, 2009

1 commit


11 Feb, 2009

1 commit


08 Jan, 2009

1 commit


18 Dec, 2008

2 commits


16 Dec, 2008

2 commits


15 Dec, 2008

1 commit


11 Nov, 2008

1 commit


07 Nov, 2008

1 commit

  • net/phonet/af_phonet.c:38:36: error: marked inline, but without a definition
    net/phonet/pep-gprs.c:63:10: warning: incorrect type in return expression (different base types)
    net/phonet/pep-gprs.c:63:10: expected int
    net/phonet/pep-gprs.c:63:10: got restricted __be16 [usertype]
    net/phonet/pep-gprs.c:65:10: warning: incorrect type in return expression (different base types)
    net/phonet/pep-gprs.c:65:10: expected int
    net/phonet/pep-gprs.c:65:10: got restricted __be16 [usertype]
    net/phonet/pep-gprs.c:124:16: warning: incorrect type in assignment (different base types)
    net/phonet/pep-gprs.c:124:16: expected restricted __be16 [usertype] protocol
    net/phonet/pep-gprs.c:124:16: got unsigned short [unsigned] [usertype] protocol

    Signed-off-by: Harvey Harrison
    Signed-off-by: David S. Miller

    Harvey Harrison
     

06 Oct, 2008

1 commit