Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88027
b: refs/heads/master
c: 98846b5
h: refs/heads/master
i:
  88025: 5f01b06
  88023: c97bbf7
v: v3
  • Loading branch information
David S. Miller committed Mar 29, 2008
1 parent 85d9d83 commit 5c0c70a
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 24 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: bd6ca6375b9f18f40e814f391d9d1abaa916bc72
refs/heads/master: 98846b5e2363e96a2b821e211bf0169afb38a54a
1 change: 1 addition & 0 deletions trunk/drivers/atm/firestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ static int fs_open(struct atm_vcc *atm_vcc)
/* Docs are vague about this atm_hdr field. By the way, the FS
* chip makes odd errors if lower bits are set.... -- REW */
tc->atm_hdr = (vpi << 20) | (vci << 4);
tmc0 = 0;
{
int pcr = atm_pcr_goal (txtp);

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ static ssize_t bonding_store_slaves(struct device *d,

if (command[0] == '-') {
dev = NULL;
original_mtu = 0;
bond_for_each_slave(bond, slave, i)
if (strnicmp(slave->dev->name, ifname, IFNAMSIZ) == 0) {
dev = slave->dev;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wan/lapbether.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct lapbethdev {
struct net_device_stats stats; /* some statistics */
};

static struct list_head lapbeth_devices = LIST_HEAD_INIT(lapbeth_devices);
static LIST_HEAD(lapbeth_devices);

/* ------------------------------------------------------------------------ */

Expand Down
6 changes: 4 additions & 2 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1074,12 +1074,14 @@ static inline int netif_is_multiqueue(const struct net_device *dev)
}

/* Use this variant when it is known for sure that it
* is executing from interrupt context.
* is executing from hardware interrupt context or with hardware interrupts
* disabled.
*/
extern void dev_kfree_skb_irq(struct sk_buff *skb);

/* Use this variant in places where it could be invoked
* either from interrupt or non-interrupt context.
* from either hardware interrupt or other context, with hardware interrupts
* either disabled or enabled.
*/
extern void dev_kfree_skb_any(struct sk_buff *skb);

Expand Down
1 change: 0 additions & 1 deletion trunk/include/net/llc.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ struct llc_sap {

extern struct list_head llc_sap_list;
extern rwlock_t llc_sap_list_lock;
extern unsigned char llc_station_mac_sa[ETH_ALEN];

extern int llc_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/hci_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static struct hci_sec_filter hci_sec_filter = {
};

static struct bt_sock_list hci_sk_list = {
.lock = RW_LOCK_UNLOCKED
.lock = __RW_LOCK_UNLOCKED(hci_sk_list.lock)
};

/* Send frame to RAW socket */
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static u32 l2cap_feat_mask = 0x0000;
static const struct proto_ops l2cap_sock_ops;

static struct bt_sock_list l2cap_sk_list = {
.lock = RW_LOCK_UNLOCKED
.lock = __RW_LOCK_UNLOCKED(l2cap_sk_list.lock)
};

static void __l2cap_sock_close(struct sock *sk, int reason);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/rfcomm/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
static const struct proto_ops rfcomm_sock_ops;

static struct bt_sock_list rfcomm_sk_list = {
.lock = RW_LOCK_UNLOCKED
.lock = __RW_LOCK_UNLOCKED(rfcomm_sk_list.lock)
};

static void rfcomm_sock_close(struct sock *sk);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
static const struct proto_ops sco_sock_ops;

static struct bt_sock_list sco_sk_list = {
.lock = RW_LOCK_UNLOCKED
.lock = __RW_LOCK_UNLOCKED(sco_sk_list.lock)
};

static void __sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *parent);
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/ipv4/inet_fragment.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ EXPORT_SYMBOL(inet_frags_fini);
void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f)
{
nf->low_thresh = 0;

local_bh_disable();
inet_frag_evictor(nf, f);
local_bh_enable();
}
EXPORT_SYMBOL(inet_frags_exit_net);

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/ip_forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ int ip_forward(struct sk_buff *skb)
if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway)
goto sr_failed;

if (unlikely(skb->len > dst_mtu(&rt->u.dst) &&
if (unlikely(skb->len > dst_mtu(&rt->u.dst) && !skb_is_gso(skb) &&
(ip_hdr(skb)->frag_off & htons(IP_DF))) && !skb->local_df) {
IP_INC_STATS(IPSTATS_MIB_FRAGFAILS);
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/ipv6/netfilter/nf_conntrack_reasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ static __inline__ void fq_kill(struct nf_ct_frag6_queue *fq)

static void nf_ct_frag6_evictor(void)
{
local_bh_disable();
inet_frag_evictor(&nf_init_frags, &nf_frags);
local_bh_enable();
}

static void nf_ct_frag6_expire(unsigned long data)
Expand Down
8 changes: 1 addition & 7 deletions trunk/net/llc/llc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
LIST_HEAD(llc_sap_list);
DEFINE_RWLOCK(llc_sap_list_lock);

unsigned char llc_station_mac_sa[ETH_ALEN];

/**
* llc_sap_alloc - allocates and initializes sap.
*
Expand All @@ -37,8 +35,8 @@ static struct llc_sap *llc_sap_alloc(void)
struct llc_sap *sap = kzalloc(sizeof(*sap), GFP_ATOMIC);

if (sap) {
/* sap->laddr.mac - leave as a null, it's filled by bind */
sap->state = LLC_SAP_STATE_ACTIVE;
memcpy(sap->laddr.mac, llc_station_mac_sa, ETH_ALEN);
rwlock_init(&sap->sk_list.lock);
atomic_set(&sap->refcnt, 1);
}
Expand Down Expand Up @@ -167,10 +165,6 @@ static int __init llc_init(void)
if (dev != NULL)
dev = next_net_device(dev);

if (dev != NULL)
memcpy(llc_station_mac_sa, dev->dev_addr, ETH_ALEN);
else
memset(llc_station_mac_sa, 0, ETH_ALEN);
dev_add_pack(&llc_packet_type);
dev_add_pack(&llc_tr_packet_type);
return 0;
Expand Down
6 changes: 5 additions & 1 deletion trunk/net/llc/llc_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ static inline int llc_fixup_skb(struct sk_buff *skb)
skb_pull(skb, llc_len);
if (skb->protocol == htons(ETH_P_802_2)) {
__be16 pdulen = eth_hdr(skb)->h_proto;
u16 data_size = ntohs(pdulen) - llc_len;
s32 data_size = ntohs(pdulen) - llc_len;

if (data_size < 0 ||
((skb_tail_pointer(skb) -
(u8 *)pdu) - llc_len) < data_size)
return 0;
if (unlikely(pskb_trim_rcsum(skb, data_size)))
return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/llc/llc_station.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static int llc_station_ac_send_null_dsap_xid_c(struct sk_buff *skb)
goto out;
llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, 0, LLC_PDU_CMD);
llc_pdu_init_as_xid_cmd(nskb, LLC_XID_NULL_CLASS_2, 127);
rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, llc_station_mac_sa);
rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, skb->dev->dev_addr);
if (unlikely(rc))
goto free;
llc_station_send_pdu(nskb);
Expand All @@ -283,7 +283,7 @@ static int llc_station_ac_send_xid_r(struct sk_buff *skb)
llc_pdu_decode_ssap(skb, &dsap);
llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP);
llc_pdu_init_as_xid_rsp(nskb, LLC_XID_NULL_CLASS_2, 127);
rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da);
rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da);
if (unlikely(rc))
goto free;
llc_station_send_pdu(nskb);
Expand All @@ -307,7 +307,7 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb)
llc_pdu_decode_ssap(skb, &dsap);
llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP);
llc_pdu_init_as_test_rsp(nskb, skb);
rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da);
rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da);
if (unlikely(rc))
goto free;
llc_station_send_pdu(nskb);
Expand Down
18 changes: 15 additions & 3 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,22 @@ static inline int qdisc_restart(struct net_device *dev)

void __qdisc_run(struct net_device *dev)
{
do {
if (!qdisc_restart(dev))
unsigned long start_time = jiffies;

while (qdisc_restart(dev)) {
if (netif_queue_stopped(dev))
break;

/*
* Postpone processing if
* 1. another process needs the CPU;
* 2. we've been doing it for too long.
*/
if (need_resched() || jiffies != start_time) {
netif_schedule(dev);
break;
} while (!netif_queue_stopped(dev));
}
}

clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
}
Expand Down

0 comments on commit 5c0c70a

Please sign in to comment.