Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109687
b: refs/heads/master
c: e228c1b
h: refs/heads/master
i:
  109685: 92aff21
  109683: 2b6bd19
  109679: 4ace532
v: v3
  • Loading branch information
Linus Torvalds committed Sep 8, 2008
1 parent 46765fc commit 919666d
Show file tree
Hide file tree
Showing 15 changed files with 109 additions and 28 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: 8e48b6b307085ce8a747cf94294742f7b7a11b18
refs/heads/master: e228c1b51ef572843827630e643a682ef492b933
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ S: Supported
EMBEDDED LINUX
P: Paul Gortmaker
M: paul.gortmaker@windriver.com
P David Woodhouse
P: David Woodhouse
M: dwmw2@infradead.org
L: linux-embedded@vger.kernel.org
S: Maintained
Expand Down
14 changes: 6 additions & 8 deletions trunk/arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ void smp_bogo(struct seq_file *m)
i, cpu_data(i).clock_tick);
}

static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock);

extern void setup_sparc64_timer(void);

static volatile unsigned long callin_flag = 0;
Expand Down Expand Up @@ -120,9 +118,9 @@ void __cpuinit smp_callin(void)
while (!cpu_isset(cpuid, smp_commenced_mask))
rmb();

spin_lock(&call_lock);
ipi_call_lock();
cpu_set(cpuid, cpu_online_map);
spin_unlock(&call_lock);
ipi_call_unlock();

/* idle thread is expected to have preempt disabled */
preempt_disable();
Expand Down Expand Up @@ -1305,10 +1303,6 @@ int __cpu_disable(void)
c->core_id = 0;
c->proc_id = -1;

spin_lock(&call_lock);
cpu_clear(cpu, cpu_online_map);
spin_unlock(&call_lock);

smp_wmb();

/* Make sure no interrupts point to this cpu. */
Expand All @@ -1318,6 +1312,10 @@ int __cpu_disable(void)
mdelay(1);
local_irq_disable();

ipi_call_lock();
cpu_clear(cpu, cpu_online_map);
ipi_call_unlock();

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/serial/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static int usb_console_setup(struct console *co, char *options)
if (serial->type->set_termios) {
termios->c_cflag = cflag;
tty_termios_encode_baud_rate(termios, baud, baud);
serial->type->set_termios(NULL, port, &dummy);
serial->type->set_termios(tty, port, &dummy);

port->port.tty = NULL;
kfree(termios);
Expand Down
6 changes: 6 additions & 0 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,12 @@ static int nfs_parse_mount_options(char *raw,
}
}

if (errors > 0) {
dfprintk(MOUNT, "NFS: parsing encountered %d error%s\n",
errors, (errors == 1 ? "" : "s"));
if (!sloppy)
return 0;
}
return 1;

out_nomem:
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/net/inet_timewait_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ extern void inet_twsk_schedule(struct inet_timewait_sock *tw,
extern void inet_twsk_deschedule(struct inet_timewait_sock *tw,
struct inet_timewait_death_row *twdr);

extern void inet_twsk_purge(struct net *net, struct inet_hashinfo *hashinfo,
struct inet_timewait_death_row *twdr, int family);

static inline
struct net *twsk_net(const struct inet_timewait_sock *twsk)
{
Expand Down
8 changes: 7 additions & 1 deletion trunk/net/bridge/br_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,21 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
return 0;

case BRCTL_SET_BRIDGE_HELLO_TIME:
{
unsigned long t = clock_t_to_jiffies(args[1]);
if (!capable(CAP_NET_ADMIN))
return -EPERM;

if (t < HZ)
return -EINVAL;

spin_lock_bh(&br->lock);
br->bridge_hello_time = clock_t_to_jiffies(args[1]);
br->bridge_hello_time = t;
if (br_is_root_bridge(br))
br->hello_time = br->bridge_hello_time;
spin_unlock_bh(&br->lock);
return 0;
}

case BRCTL_SET_BRIDGE_MAX_AGE:
if (!capable(CAP_NET_ADMIN))
Expand Down
26 changes: 18 additions & 8 deletions trunk/net/bridge/br_sysfs_br.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
*/
static ssize_t store_bridge_parm(struct device *d,
const char *buf, size_t len,
void (*set)(struct net_bridge *, unsigned long))
int (*set)(struct net_bridge *, unsigned long))
{
struct net_bridge *br = to_bridge(d);
char *endp;
unsigned long val;
int err;

if (!capable(CAP_NET_ADMIN))
return -EPERM;
Expand All @@ -43,9 +44,9 @@ static ssize_t store_bridge_parm(struct device *d,
return -EINVAL;

spin_lock_bh(&br->lock);
(*set)(br, val);
err = (*set)(br, val);
spin_unlock_bh(&br->lock);
return len;
return err ? err : len;
}


Expand All @@ -56,12 +57,13 @@ static ssize_t show_forward_delay(struct device *d,
return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->forward_delay));
}

static void set_forward_delay(struct net_bridge *br, unsigned long val)
static int set_forward_delay(struct net_bridge *br, unsigned long val)
{
unsigned long delay = clock_t_to_jiffies(val);
br->forward_delay = delay;
if (br_is_root_bridge(br))
br->bridge_forward_delay = delay;
return 0;
}

static ssize_t store_forward_delay(struct device *d,
Expand All @@ -80,12 +82,17 @@ static ssize_t show_hello_time(struct device *d, struct device_attribute *attr,
jiffies_to_clock_t(to_bridge(d)->hello_time));
}

static void set_hello_time(struct net_bridge *br, unsigned long val)
static int set_hello_time(struct net_bridge *br, unsigned long val)
{
unsigned long t = clock_t_to_jiffies(val);

if (t < HZ)
return -EINVAL;

br->hello_time = t;
if (br_is_root_bridge(br))
br->bridge_hello_time = t;
return 0;
}

static ssize_t store_hello_time(struct device *d,
Expand All @@ -104,12 +111,13 @@ static ssize_t show_max_age(struct device *d, struct device_attribute *attr,
jiffies_to_clock_t(to_bridge(d)->max_age));
}

static void set_max_age(struct net_bridge *br, unsigned long val)
static int set_max_age(struct net_bridge *br, unsigned long val)
{
unsigned long t = clock_t_to_jiffies(val);
br->max_age = t;
if (br_is_root_bridge(br))
br->bridge_max_age = t;
return 0;
}

static ssize_t store_max_age(struct device *d, struct device_attribute *attr,
Expand All @@ -126,9 +134,10 @@ static ssize_t show_ageing_time(struct device *d,
return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->ageing_time));
}

static void set_ageing_time(struct net_bridge *br, unsigned long val)
static int set_ageing_time(struct net_bridge *br, unsigned long val)
{
br->ageing_time = clock_t_to_jiffies(val);
return 0;
}

static ssize_t store_ageing_time(struct device *d,
Expand Down Expand Up @@ -180,9 +189,10 @@ static ssize_t show_priority(struct device *d, struct device_attribute *attr,
(br->bridge_id.prio[0] << 8) | br->bridge_id.prio[1]);
}

static void set_priority(struct net_bridge *br, unsigned long val)
static int set_priority(struct net_bridge *br, unsigned long val)
{
br_stp_set_bridge_priority(br, (u16) val);
return 0;
}

static ssize_t store_priority(struct device *d, struct device_attribute *attr,
Expand Down
7 changes: 6 additions & 1 deletion trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1991,8 +1991,13 @@ static void net_tx_action(struct softirq_action *h)
spin_unlock(root_lock);
} else {
if (!test_bit(__QDISC_STATE_DEACTIVATED,
&q->state))
&q->state)) {
__netif_reschedule(q);
} else {
smp_mb__before_clear_bit();
clear_bit(__QDISC_STATE_SCHED,
&q->state);
}
}
}
}
Expand Down
35 changes: 35 additions & 0 deletions trunk/net/ipv4/inet_timewait_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,3 +409,38 @@ void inet_twdr_twcal_tick(unsigned long data)
}

EXPORT_SYMBOL_GPL(inet_twdr_twcal_tick);

void inet_twsk_purge(struct net *net, struct inet_hashinfo *hashinfo,
struct inet_timewait_death_row *twdr, int family)
{
struct inet_timewait_sock *tw;
struct sock *sk;
struct hlist_node *node;
int h;

local_bh_disable();
for (h = 0; h < (hashinfo->ehash_size); h++) {
struct inet_ehash_bucket *head =
inet_ehash_bucket(hashinfo, h);
rwlock_t *lock = inet_ehash_lockp(hashinfo, h);
restart:
write_lock(lock);
sk_for_each(sk, node, &head->twchain) {

tw = inet_twsk(sk);
if (!net_eq(twsk_net(tw), net) ||
tw->tw_family != family)
continue;

atomic_inc(&tw->tw_refcnt);
write_unlock(lock);
inet_twsk_deschedule(tw, twdr);
inet_twsk_put(tw);

goto restart;
}
write_unlock(lock);
}
local_bh_enable();
}
EXPORT_SYMBOL_GPL(inet_twsk_purge);
1 change: 1 addition & 0 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -2376,6 +2376,7 @@ static int __net_init tcp_sk_init(struct net *net)
static void __net_exit tcp_sk_exit(struct net *net)
{
inet_ctl_sock_destroy(net->ipv4.tcp_sock);
inet_twsk_purge(net, &tcp_hashinfo, &tcp_death_row, AF_INET);
}

static struct pernet_operations __net_initdata tcp_sk_ops = {
Expand Down
1 change: 1 addition & 0 deletions trunk/net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -2148,6 +2148,7 @@ static int tcpv6_net_init(struct net *net)
static void tcpv6_net_exit(struct net *net)
{
inet_ctl_sock_destroy(net->ipv6.tcp_sk);
inet_twsk_purge(net, &tcp_hashinfo, &tcp_death_row, AF_INET6);
}

static struct pernet_operations tcpv6_net_ops = {
Expand Down
10 changes: 10 additions & 0 deletions trunk/net/netfilter/nf_conntrack_irc.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,21 @@ static const char *const dccprotos[] = {
static int parse_dcc(char *data, const char *data_end, u_int32_t *ip,
u_int16_t *port, char **ad_beg_p, char **ad_end_p)
{
char *tmp;

/* at least 12: "AAAAAAAA P\1\n" */
while (*data++ != ' ')
if (data > data_end - 12)
return -1;

/* Make sure we have a newline character within the packet boundaries
* because simple_strtoul parses until the first invalid character. */
for (tmp = data; tmp <= data_end; tmp++)
if (*tmp == '\n')
break;
if (tmp > data_end || *tmp != '\n')
return -1;

*ad_beg_p = data;
*ip = simple_strtoul(data, &data, 10);

Expand Down
14 changes: 9 additions & 5 deletions trunk/net/netfilter/nf_conntrack_proto_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ static LIST_HEAD(gre_keymap_list);

void nf_ct_gre_keymap_flush(void)
{
struct list_head *pos, *n;
struct nf_ct_gre_keymap *km, *tmp;

write_lock_bh(&nf_ct_gre_lock);
list_for_each_safe(pos, n, &gre_keymap_list) {
list_del(pos);
kfree(pos);
list_for_each_entry_safe(km, tmp, &gre_keymap_list, list) {
list_del(&km->list);
kfree(km);
}
write_unlock_bh(&nf_ct_gre_lock);
}
Expand Down Expand Up @@ -97,10 +97,14 @@ int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir,
kmp = &help->help.ct_pptp_info.keymap[dir];
if (*kmp) {
/* check whether it's a retransmission */
read_lock_bh(&nf_ct_gre_lock);
list_for_each_entry(km, &gre_keymap_list, list) {
if (gre_key_cmpfn(km, t) && km == *kmp)
if (gre_key_cmpfn(km, t) && km == *kmp) {
read_unlock_bh(&nf_ct_gre_lock);
return 0;
}
}
read_unlock_bh(&nf_ct_gre_lock);
pr_debug("trying to override keymap_%s for ct %p\n",
dir == IP_CT_DIR_REPLY ? "reply" : "orig", ct);
return -EEXIST;
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/netfilter/nf_conntrack_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,6 @@ static const struct sip_handler sip_handlers[] = {
static int process_sip_response(struct sk_buff *skb,
const char **dptr, unsigned int *datalen)
{
static const struct sip_handler *handler;
enum ip_conntrack_info ctinfo;
struct nf_conn *ct = nf_ct_get(skb, &ctinfo);
unsigned int matchoff, matchlen;
Expand All @@ -1214,6 +1213,8 @@ static int process_sip_response(struct sk_buff *skb,
dataoff = matchoff + matchlen + 1;

for (i = 0; i < ARRAY_SIZE(sip_handlers); i++) {
const struct sip_handler *handler;

handler = &sip_handlers[i];
if (handler->response == NULL)
continue;
Expand All @@ -1228,13 +1229,14 @@ static int process_sip_response(struct sk_buff *skb,
static int process_sip_request(struct sk_buff *skb,
const char **dptr, unsigned int *datalen)
{
static const struct sip_handler *handler;
enum ip_conntrack_info ctinfo;
struct nf_conn *ct = nf_ct_get(skb, &ctinfo);
unsigned int matchoff, matchlen;
unsigned int cseq, i;

for (i = 0; i < ARRAY_SIZE(sip_handlers); i++) {
const struct sip_handler *handler;

handler = &sip_handlers[i];
if (handler->request == NULL)
continue;
Expand Down

0 comments on commit 919666d

Please sign in to comment.