Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Fri, 13 Apr 2012 15:30:55 +0000 (11:30 -0400)]
Pull in the 'net' tree to get CAIF bug fixes upon which
the following set of CAIF feature patches depend.

Signed-off-by: David S. Miller <davem@davemloft.net>

1  2 
net/caif/chnl_net.c

diff --combined net/caif/chnl_net.c
@@@ -103,6 -103,7 +103,7 @@@ static int chnl_recv_cb(struct cflayer 
                skb->protocol = htons(ETH_P_IPV6);
                break;
        default:
+               kfree_skb(skb);
                priv->netdev->stats.rx_errors++;
                return -EINVAL;
        }
@@@ -220,14 -221,16 +221,16 @@@ static int chnl_net_start_xmit(struct s
  
        if (skb->len > priv->netdev->mtu) {
                pr_warn("Size of skb exceeded MTU\n");
+               kfree_skb(skb);
                dev->stats.tx_errors++;
-               return -ENOSPC;
+               return NETDEV_TX_OK;
        }
  
        if (!priv->flowenabled) {
                pr_debug("dropping packets flow off\n");
+               kfree_skb(skb);
                dev->stats.tx_dropped++;
-               return NETDEV_TX_BUSY;
+               return NETDEV_TX_OK;
        }
  
        if (priv->conn_req.protocol == CAIFPROTO_DATAGRAM_LOOP)
        result = priv->chnl.dn->transmit(priv->chnl.dn, pkt);
        if (result) {
                dev->stats.tx_dropped++;
-               return result;
+               return NETDEV_TX_OK;
        }
  
        /* Update statistics. */
@@@ -421,14 -424,14 +424,14 @@@ static int ipcaif_fill_info(struct sk_b
        struct chnl_net *priv;
        u8 loop;
        priv = netdev_priv(dev);
 -      NLA_PUT_U32(skb, IFLA_CAIF_IPV4_CONNID,
 -                  priv->conn_req.sockaddr.u.dgm.connection_id);
 -      NLA_PUT_U32(skb, IFLA_CAIF_IPV6_CONNID,
 -                  priv->conn_req.sockaddr.u.dgm.connection_id);
 +      if (nla_put_u32(skb, IFLA_CAIF_IPV4_CONNID,
 +                      priv->conn_req.sockaddr.u.dgm.connection_id) ||
 +          nla_put_u32(skb, IFLA_CAIF_IPV6_CONNID,
 +                      priv->conn_req.sockaddr.u.dgm.connection_id))
 +              goto nla_put_failure;
        loop = priv->conn_req.protocol == CAIFPROTO_DATAGRAM_LOOP;
 -      NLA_PUT_U8(skb, IFLA_CAIF_LOOPBACK, loop);
 -
 -
 +      if (nla_put_u8(skb, IFLA_CAIF_LOOPBACK, loop))
 +              goto nla_put_failure;
        return 0;
  nla_put_failure:
        return -EMSGSIZE;