Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336091
b: refs/heads/master
c: 50a561c
h: refs/heads/master
i:
  336089: a303517
  336087: 4f00606
v: v3
  • Loading branch information
Linus Torvalds committed Nov 30, 2012
1 parent d165f58 commit f25c116
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea3aacf5f22c1002cac97985354658072232e280
refs/heads/master: 50a561ca1bd1151c78a2412e6a990fda15eb434d
1 change: 1 addition & 0 deletions trunk/drivers/atm/ambassador.c
Original file line number Diff line number Diff line change
Expand Up @@ -1961,6 +1961,7 @@ static int __devinit ucode_init (loader_block * lb, amb_dev * dev) {
res = loader_verify(lb, dev, rec);
if (res)
break;
rec = ihex_next_binrec(rec);
}
release_firmware(fw);
if (!res)
Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/net/can/usb/peak_usb/pcan_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,10 @@ static int pcan_usb_decode_error(struct pcan_usb_msg_context *mc, u8 n,
mc->pdev->dev.can.state = new_state;

if (status_len & PCAN_USB_STATUSLEN_TIMESTAMP) {
struct skb_shared_hwtstamps *hwts = skb_hwtstamps(skb);

peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv);
skb->tstamp = timeval_to_ktime(tv);
hwts->hwtstamp = timeval_to_ktime(tv);
}

netif_rx(skb);
Expand Down Expand Up @@ -605,6 +607,7 @@ static int pcan_usb_decode_data(struct pcan_usb_msg_context *mc, u8 status_len)
struct sk_buff *skb;
struct can_frame *cf;
struct timeval tv;
struct skb_shared_hwtstamps *hwts;

skb = alloc_can_skb(mc->netdev, &cf);
if (!skb)
Expand Down Expand Up @@ -652,7 +655,8 @@ static int pcan_usb_decode_data(struct pcan_usb_msg_context *mc, u8 status_len)

/* convert timestamp into kernel time */
peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv);
skb->tstamp = timeval_to_ktime(tv);
hwts = skb_hwtstamps(skb);
hwts->hwtstamp = timeval_to_ktime(tv);

/* push the skb */
netif_rx(skb);
Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ static int pcan_usb_pro_handle_canmsg(struct pcan_usb_pro_interface *usb_if,
struct can_frame *can_frame;
struct sk_buff *skb;
struct timeval tv;
struct skb_shared_hwtstamps *hwts;

skb = alloc_can_skb(netdev, &can_frame);
if (!skb)
Expand All @@ -549,7 +550,8 @@ static int pcan_usb_pro_handle_canmsg(struct pcan_usb_pro_interface *usb_if,
memcpy(can_frame->data, rx->data, can_frame->can_dlc);

peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(rx->ts32), &tv);
skb->tstamp = timeval_to_ktime(tv);
hwts = skb_hwtstamps(skb);
hwts->hwtstamp = timeval_to_ktime(tv);

netif_rx(skb);
netdev->stats.rx_packets++;
Expand All @@ -570,6 +572,7 @@ static int pcan_usb_pro_handle_error(struct pcan_usb_pro_interface *usb_if,
u8 err_mask = 0;
struct sk_buff *skb;
struct timeval tv;
struct skb_shared_hwtstamps *hwts;

/* nothing should be sent while in BUS_OFF state */
if (dev->can.state == CAN_STATE_BUS_OFF)
Expand Down Expand Up @@ -664,7 +667,8 @@ static int pcan_usb_pro_handle_error(struct pcan_usb_pro_interface *usb_if,
dev->can.state = new_state;

peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(er->ts32), &tv);
skb->tstamp = timeval_to_ktime(tv);
hwts = skb_hwtstamps(skb);
hwts->hwtstamp = timeval_to_ktime(tv);
netif_rx(skb);
netdev->stats.rx_packets++;
netdev->stats.rx_bytes += can_frame->can_dlc;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static int mlx4_en_dcbnl_ieee_setmaxrate(struct net_device *dev,
if (err)
return err;

memcpy(priv->maxrate, tmp, sizeof(*priv->maxrate));
memcpy(priv->maxrate, tmp, sizeof(priv->maxrate));

return 0;
}
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,10 +1794,12 @@ static void team_setup(struct net_device *dev)

dev->features |= NETIF_F_LLTX;
dev->features |= NETIF_F_GRO;
dev->hw_features = NETIF_F_HW_VLAN_TX |
dev->hw_features = TEAM_VLAN_FEATURES |
NETIF_F_HW_VLAN_TX |
NETIF_F_HW_VLAN_RX |
NETIF_F_HW_VLAN_FILTER;

dev->hw_features &= ~(NETIF_F_ALL_CSUM & ~NETIF_F_HW_CSUM);
dev->features |= dev->hw_features;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/usb/qmi_wwan.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ static const struct usb_device_id products[] = {
},

/* 3. Combined interface devices matching on interface number */
{QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */
{QMI_FIXED_INTF(0x19d2, 0x0002, 1)},
{QMI_FIXED_INTF(0x19d2, 0x0012, 1)},
{QMI_FIXED_INTF(0x19d2, 0x0017, 3)},
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/vhost/vhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ static int translate_desc(struct vhost_dev *dev, u64 addr, u32 len,
}
_iov = iov + ret;
size = reg->memory_size - addr + reg->guest_phys_addr;
_iov->iov_len = min((u64)len, size);
_iov->iov_len = min((u64)len - s, size);
_iov->iov_base = (void __user *)(unsigned long)
(reg->userspace_addr + addr - reg->guest_phys_addr);
s += size;
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/percpu-rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct percpu_rw_semaphore {
};

#define light_mb() barrier()
#define heavy_mb() synchronize_sched()
#define heavy_mb() synchronize_sched_expedited()

static inline void percpu_down_read(struct percpu_rw_semaphore *p)
{
Expand Down Expand Up @@ -51,7 +51,7 @@ static inline void percpu_down_write(struct percpu_rw_semaphore *p)
{
mutex_lock(&p->mtx);
p->locked = true;
synchronize_sched(); /* make sure that all readers exit the rcu_read_lock_sched region */
synchronize_sched_expedited(); /* make sure that all readers exit the rcu_read_lock_sched region */
while (__percpu_count(p->counters))
msleep(1);
heavy_mb(); /* C, between read of p->counter and write to data, paired with B */
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/can/bcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,9 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
op->sk = sk;
op->ifindex = ifindex;

/* ifindex for timeout events w/o previous frame reception */
op->rx_ifindex = ifindex;

/* initialize uninitialized (kzalloc) structure */
hrtimer_init(&op->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
op->timer.function = bcm_rx_timeout_handler;
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/ipv4/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ static inline bool icmpv4_xrlim_allow(struct net *net, struct rtable *rt,
struct inet_peer *peer = inet_getpeer_v4(net->ipv4.peers, fl4->daddr, 1);
rc = inet_peer_xrlim_allow(peer,
net->ipv4.sysctl_icmp_ratelimit);
inet_putpeer(peer);
if (peer)
inet_putpeer(peer);
}
out:
return rc;
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/ipv4/ipmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,10 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval, unsi
if (get_user(v, (u32 __user *)optval))
return -EFAULT;

/* "pimreg%u" should not exceed 16 bytes (IFNAMSIZ) */
if (v != RT_TABLE_DEFAULT && v >= 1000000000)
return -EINVAL;

rtnl_lock();
ret = 0;
if (sk == rtnl_dereference(mrt->mroute_sk)) {
Expand Down
1 change: 1 addition & 0 deletions trunk/net/irda/irttp.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0);
if (lsap == NULL) {
IRDA_DEBUG(0, "%s: unable to allocate LSAP!!\n", __func__);
__irttp_close_tsap(self);
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/netfilter/ipset/ip_set_hash_netiface.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ static struct ip_set_type hash_netiface_type __read_mostly = {
[IPSET_ATTR_IP] = { .type = NLA_NESTED },
[IPSET_ATTR_IP_TO] = { .type = NLA_NESTED },
[IPSET_ATTR_IFACE] = { .type = NLA_NUL_STRING,
.len = IPSET_MAXNAMELEN - 1 },
.len = IFNAMSIZ - 1 },
[IPSET_ATTR_CADT_FLAGS] = { .type = NLA_U32 },
[IPSET_ATTR_CIDR] = { .type = NLA_U8 },
[IPSET_ATTR_TIMEOUT] = { .type = NLA_U32 },
Expand Down
14 changes: 5 additions & 9 deletions trunk/net/openvswitch/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,15 +702,11 @@ int ovs_flow_extract(struct sk_buff *skb, u16 in_port, struct sw_flow_key *key,
/* We only match on the lower 8 bits of the opcode. */
if (ntohs(arp->ar_op) <= 0xff)
key->ip.proto = ntohs(arp->ar_op);

if (key->ip.proto == ARPOP_REQUEST
|| key->ip.proto == ARPOP_REPLY) {
memcpy(&key->ipv4.addr.src, arp->ar_sip, sizeof(key->ipv4.addr.src));
memcpy(&key->ipv4.addr.dst, arp->ar_tip, sizeof(key->ipv4.addr.dst));
memcpy(key->ipv4.arp.sha, arp->ar_sha, ETH_ALEN);
memcpy(key->ipv4.arp.tha, arp->ar_tha, ETH_ALEN);
key_len = SW_FLOW_KEY_OFFSET(ipv4.arp);
}
memcpy(&key->ipv4.addr.src, arp->ar_sip, sizeof(key->ipv4.addr.src));
memcpy(&key->ipv4.addr.dst, arp->ar_tip, sizeof(key->ipv4.addr.dst));
memcpy(key->ipv4.arp.sha, arp->ar_sha, ETH_ALEN);
memcpy(key->ipv4.arp.tha, arp->ar_tha, ETH_ALEN);
key_len = SW_FLOW_KEY_OFFSET(ipv4.arp);
}
} else if (key->eth.type == htons(ETH_P_IPV6)) {
int nh_len; /* IPv6 Header + Extensions */
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/openvswitch/vport-netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static int netdev_send(struct vport *vport, struct sk_buff *skb)

if (unlikely(packet_length(skb) > mtu && !skb_is_gso(skb))) {
net_warn_ratelimited("%s: dropped over-mtu packet: %d > %d\n",
ovs_dp_name(vport->dp),
netdev_vport->dev->name,
packet_length(skb), mtu);
goto error;
}
Expand Down
20 changes: 14 additions & 6 deletions trunk/net/sctp/chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,

msg = sctp_datamsg_new(GFP_KERNEL);
if (!msg)
return NULL;
return ERR_PTR(-ENOMEM);

/* Note: Calculate this outside of the loop, so that all fragments
* have the same expiration.
Expand Down Expand Up @@ -280,11 +280,14 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,

chunk = sctp_make_datafrag_empty(asoc, sinfo, len, frag, 0);

if (!chunk)
if (!chunk) {
err = -ENOMEM;
goto errout;
}

err = sctp_user_addto_chunk(chunk, offset, len, msgh->msg_iov);
if (err < 0)
goto errout;
goto errout_chunk_free;

offset += len;

Expand Down Expand Up @@ -315,31 +318,36 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,

chunk = sctp_make_datafrag_empty(asoc, sinfo, over, frag, 0);

if (!chunk)
if (!chunk) {
err = -ENOMEM;
goto errout;
}

err = sctp_user_addto_chunk(chunk, offset, over,msgh->msg_iov);

/* Put the chunk->skb back into the form expected by send. */
__skb_pull(chunk->skb, (__u8 *)chunk->chunk_hdr
- (__u8 *)chunk->skb->data);
if (err < 0)
goto errout;
goto errout_chunk_free;

sctp_datamsg_assign(msg, chunk);
list_add_tail(&chunk->frag_list, &msg->chunks);
}

return msg;

errout_chunk_free:
sctp_chunk_free(chunk);

errout:
list_for_each_safe(pos, temp, &msg->chunks) {
list_del_init(pos);
chunk = list_entry(pos, struct sctp_chunk, frag_list);
sctp_chunk_free(chunk);
}
sctp_datamsg_put(msg);
return NULL;
return ERR_PTR(err);
}

/* Check whether this message has expired. */
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1915,8 +1915,8 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,

/* Break the message into multiple chunks of maximum size. */
datamsg = sctp_datamsg_from_user(asoc, sinfo, msg, msg_len);
if (!datamsg) {
err = -ENOMEM;
if (IS_ERR(datamsg)) {
err = PTR_ERR(datamsg);
goto out_free;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/sctp/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ void sctp_transport_update_rto(struct sctp_transport *tp, __u32 rtt)
* 1/8, rto_alpha would be expressed as 3.
*/
tp->rttvar = tp->rttvar - (tp->rttvar >> net->sctp.rto_beta)
+ ((abs(tp->srtt - rtt)) >> net->sctp.rto_beta);
+ (((__u32)abs64((__s64)tp->srtt - (__s64)rtt)) >> net->sctp.rto_beta);
tp->srtt = tp->srtt - (tp->srtt >> net->sctp.rto_alpha)
+ (rtt >> net->sctp.rto_alpha);
} else {
Expand Down

0 comments on commit f25c116

Please sign in to comment.