Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/davem/net-2.6
  • Loading branch information
David S. Miller committed Mar 21, 2008
2 parents 938b93a + 94833df commit a25606c
Show file tree
Hide file tree
Showing 14 changed files with 152 additions and 76 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ P: Marcel Holtmann
M: marcel@holtmann.org
P: Maxim Krasnyansky
M: maxk@qualcomm.com
L: bluez-devel@lists.sf.net
L: linux-bluetooth@vger.kernel.org
W: http://bluez.sf.net
W: http://www.bluez.org
W: http://www.holtmann.org/linux/bluetooth/
Expand Down
15 changes: 15 additions & 0 deletions drivers/net/ifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <linux/moduleparam.h>
#include <net/pkt_sched.h>
#include <net/net_namespace.h>
#include <linux/lockdep.h>

#define TX_TIMEOUT (2*HZ)

Expand Down Expand Up @@ -227,6 +228,16 @@ static struct rtnl_link_ops ifb_link_ops __read_mostly = {
module_param(numifbs, int, 0);
MODULE_PARM_DESC(numifbs, "Number of ifb devices");

/*
* dev_ifb->queue_lock is usually taken after dev->ingress_lock,
* reversely to e.g. qdisc_lock_tree(). It should be safe until
* ifb doesn't take dev->queue_lock with dev_ifb->ingress_lock.
* But lockdep should know that ifb has different locks from dev.
*/
static struct lock_class_key ifb_queue_lock_key;
static struct lock_class_key ifb_ingress_lock_key;


static int __init ifb_init_one(int index)
{
struct net_device *dev_ifb;
Expand All @@ -246,6 +257,10 @@ static int __init ifb_init_one(int index)
err = register_netdevice(dev_ifb);
if (err < 0)
goto err;

lockdep_set_class(&dev_ifb->queue_lock, &ifb_queue_lock_key);
lockdep_set_class(&dev_ifb->ingress_lock, &ifb_ingress_lock_key);

return 0;

err:
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@

#define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "3.87"
#define DRV_MODULE_RELDATE "December 20, 2007"
#define DRV_MODULE_VERSION "3.88"
#define DRV_MODULE_RELDATE "March 20, 2008"

#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0
Expand Down Expand Up @@ -11841,7 +11841,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp)
}

if (!is_valid_ether_addr(&dev->dev_addr[0])) {
#ifdef CONFIG_SPARC64
#ifdef CONFIG_SPARC
if (!tg3_get_default_macaddr_sparc(tp))
return 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,7 @@ static const struct pid_entry tgid_base_stuff[] = {
DIR("fd", S_IRUSR|S_IXUSR, fd),
DIR("fdinfo", S_IRUSR|S_IXUSR, fdinfo),
#ifdef CONFIG_NET
DIR("net", S_IRUGO|S_IXUSR, net),
DIR("net", S_IRUGO|S_IXUGO, net),
#endif
REG("environ", S_IRUSR, environ),
INF("auxv", S_IRUSR, pid_auxv),
Expand Down
12 changes: 8 additions & 4 deletions include/net/sctp/sctp.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,19 @@ static inline void sctp_sysctl_unregister(void) { return; }

#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)

int sctp_v6_init(void);
void sctp_v6_exit(void);
void sctp_v6_pf_init(void);
void sctp_v6_pf_exit(void);
int sctp_v6_protosw_init(void);
void sctp_v6_protosw_exit(void);
int sctp_v6_add_protocol(void);
void sctp_v6_del_protocol(void);

#else /* #ifdef defined(CONFIG_IPV6) */

static inline int sctp_v6_init(void) { return 0; }
static inline void sctp_v6_exit(void) { return; }
static inline void sctp_v6_pf_init(void) { return 0; }
static inline void sctp_v6_pf_exit(void) { return; }
static inline int sctp_v6_protosw_init(void) { return 0; }
static inline void sctp_v6_protosw_exit(void) { return; }
static inline int sctp_v6_add_protocol(void) { return 0; }
static inline void sctp_v6_del_protocol(void) { return; }

Expand Down
11 changes: 8 additions & 3 deletions kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,13 @@ static int audit_default;
/* If auditing cannot proceed, audit_failure selects what happens. */
static int audit_failure = AUDIT_FAIL_PRINTK;

/* If audit records are to be written to the netlink socket, audit_pid
* contains the (non-zero) pid. */
/*
* If audit records are to be written to the netlink socket, audit_pid
* contains the pid of the auditd process and audit_nlk_pid contains
* the pid to use to send netlink messages to that process.
*/
int audit_pid;
static int audit_nlk_pid;

/* If audit_rate_limit is non-zero, limit the rate of sending audit records
* to that number per second. This prevents DoS attacks, but results in
Expand Down Expand Up @@ -350,7 +354,7 @@ static int kauditd_thread(void *dummy)
wake_up(&audit_backlog_wait);
if (skb) {
if (audit_pid) {
int err = netlink_unicast(audit_sock, skb, audit_pid, 0);
int err = netlink_unicast(audit_sock, skb, audit_nlk_pid, 0);
if (err < 0) {
BUG_ON(err != -ECONNREFUSED); /* Shoudn't happen */
printk(KERN_ERR "audit: *NO* daemon at audit_pid=%d\n", audit_pid);
Expand Down Expand Up @@ -626,6 +630,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
sid, 1);

audit_pid = new_pid;
audit_nlk_pid = NETLINK_CB(skb).pid;
}
if (status_get->mask & AUDIT_STATUS_RATE_LIMIT)
err = audit_set_rate_limit(status_get->rate_limit,
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/br_fdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void br_fdb_cleanup(unsigned long _data)
this_timer = f->ageing_timer + delay;
if (time_before_eq(this_timer, jiffies))
fdb_delete(f);
else if (this_timer < next_timer)
else if (time_before(this_timer, next_timer))
next_timer = this_timer;
}
}
Expand Down
6 changes: 4 additions & 2 deletions net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,12 @@ static void zap_completion_queue(void)
while (clist != NULL) {
struct sk_buff *skb = clist;
clist = clist->next;
if (skb->destructor)
if (skb->destructor) {
atomic_inc(&skb->users);
dev_kfree_skb_any(skb); /* put this one back */
else
} else {
__kfree_skb(skb);
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions net/ipv4/netfilter/ipt_recent.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ recent_mt_check(const char *tablename, const void *ip,
if ((info->check_set & (IPT_RECENT_SET | IPT_RECENT_REMOVE)) &&
(info->seconds || info->hit_count))
return false;
if (info->hit_count > ip_pkt_list_tot)
return false;
if (info->name[0] == '\0' ||
strnlen(info->name, IPT_RECENT_NAME_LEN) == IPT_RECENT_NAME_LEN)
return false;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static u16 tcp_select_window(struct sock *sk)
*
* Relax Will Robinson.
*/
new_win = cur_win;
new_win = ALIGN(cur_win, 1 << tp->rx_opt.rcv_wscale);
}
tp->rcv_wnd = new_win;
tp->rcv_wup = tp->rcv_nxt;
Expand Down
5 changes: 3 additions & 2 deletions net/ipv6/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,12 @@ config IPV6_SIT
Saying M here will produce a module called sit.ko. If unsure, say Y.

config IPV6_TUNNEL
tristate "IPv6: IPv6-in-IPv6 tunnel"
tristate "IPv6: IP-in-IPv6 tunnel (RFC2473)"
select INET6_TUNNEL
depends on IPV6
---help---
Support for IPv6-in-IPv6 tunnels described in RFC 2473.
Support for IPv6-in-IPv6 and IPv4-in-IPv6 tunnels described in
RFC 2473.

If unsure, say N.

Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_h323_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ static int process_setup(struct sk_buff *skb, struct nf_conn *ct,

set_h225_addr = rcu_dereference(set_h225_addr_hook);
if ((setup->options & eSetup_UUIE_destCallSignalAddress) &&
(set_h225_addr) && ct->status && IPS_NAT_MASK &&
(set_h225_addr) && ct->status & IPS_NAT_MASK &&
get_h225_addr(ct, *data, &setup->destCallSignalAddress,
&addr, &port) &&
memcmp(&addr, &ct->tuplehash[!dir].tuple.src.u3, sizeof(addr))) {
Expand Down
32 changes: 20 additions & 12 deletions net/sctp/ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,15 +1015,24 @@ static struct sctp_pf sctp_pf_inet6 = {
};

/* Initialize IPv6 support and register with socket layer. */
int sctp_v6_init(void)
void sctp_v6_pf_init(void)
{
int rc;

/* Register the SCTP specific PF_INET6 functions. */
sctp_register_pf(&sctp_pf_inet6, PF_INET6);

/* Register the SCTP specific AF_INET6 functions. */
sctp_register_af(&sctp_af_inet6);
}

void sctp_v6_pf_exit(void)
{
list_del(&sctp_af_inet6.list);
}

/* Initialize IPv6 support and register with socket layer. */
int sctp_v6_protosw_init(void)
{
int rc;

rc = proto_register(&sctpv6_prot, 1);
if (rc)
Expand All @@ -1036,6 +1045,14 @@ int sctp_v6_init(void)
return 0;
}

void sctp_v6_protosw_exit(void)
{
inet6_unregister_protosw(&sctpv6_seqpacket_protosw);
inet6_unregister_protosw(&sctpv6_stream_protosw);
proto_unregister(&sctpv6_prot);
}


/* Register with inet6 layer. */
int sctp_v6_add_protocol(void)
{
Expand All @@ -1048,15 +1065,6 @@ int sctp_v6_add_protocol(void)
return 0;
}

/* IPv6 specific exit support. */
void sctp_v6_exit(void)
{
inet6_unregister_protosw(&sctpv6_seqpacket_protosw);
inet6_unregister_protosw(&sctpv6_stream_protosw);
proto_unregister(&sctpv6_prot);
list_del(&sctp_af_inet6.list);
}

/* Unregister with inet6 layer. */
void sctp_v6_del_protocol(void)
{
Expand Down
Loading

0 comments on commit a25606c

Please sign in to comment.