Commit b8e6c91c authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  bnx2x: Version update
  bnx2x: Multi Queue
  bnx2x: NAPI and interrupts enable/disable
  bnx2x: NIC load failure cleanup
  bnx2x: Initialization structure
  bnx2x: HW lock timeout
  bnx2x: Minimize lock time
  bnx2x: Fan failure mechanism on additional design
  bnx2x: Rx work check
  ipv6: sysctl fixes
  ipv4: sysctl fixes
  sctp: add verification checks to SCTP_AUTH_KEY option
parents e5778ec9 c2d42545
...@@ -271,7 +271,7 @@ struct bnx2x_fastpath { ...@@ -271,7 +271,7 @@ struct bnx2x_fastpath {
(fp->tx_pkt_prod != fp->tx_pkt_cons)) (fp->tx_pkt_prod != fp->tx_pkt_cons))
#define BNX2X_HAS_RX_WORK(fp) \ #define BNX2X_HAS_RX_WORK(fp) \
(fp->rx_comp_cons != le16_to_cpu(*fp->rx_cons_sb)) (fp->rx_comp_cons != rx_cons_sb)
#define BNX2X_HAS_WORK(fp) (BNX2X_HAS_RX_WORK(fp) || BNX2X_HAS_TX_WORK(fp)) #define BNX2X_HAS_WORK(fp) (BNX2X_HAS_RX_WORK(fp) || BNX2X_HAS_TX_WORK(fp))
......
This diff is collapsed.
...@@ -3116,14 +3116,23 @@ static ctl_table ipv4_route_table[] = { ...@@ -3116,14 +3116,23 @@ static ctl_table ipv4_route_table[] = {
{ .ctl_name = 0 } { .ctl_name = 0 }
}; };
static __net_initdata struct ctl_path ipv4_route_path[] = { static struct ctl_table empty[1];
static struct ctl_table ipv4_skeleton[] =
{
{ .procname = "route", .ctl_name = NET_IPV4_ROUTE,
.child = ipv4_route_table},
{ .procname = "neigh", .ctl_name = NET_IPV4_NEIGH,
.child = empty},
{ }
};
static __net_initdata struct ctl_path ipv4_path[] = {
{ .procname = "net", .ctl_name = CTL_NET, }, { .procname = "net", .ctl_name = CTL_NET, },
{ .procname = "ipv4", .ctl_name = NET_IPV4, }, { .procname = "ipv4", .ctl_name = NET_IPV4, },
{ .procname = "route", .ctl_name = NET_IPV4_ROUTE, },
{ }, { },
}; };
static struct ctl_table ipv4_route_flush_table[] = { static struct ctl_table ipv4_route_flush_table[] = {
{ {
.ctl_name = NET_IPV4_ROUTE_FLUSH, .ctl_name = NET_IPV4_ROUTE_FLUSH,
...@@ -3136,6 +3145,13 @@ static struct ctl_table ipv4_route_flush_table[] = { ...@@ -3136,6 +3145,13 @@ static struct ctl_table ipv4_route_flush_table[] = {
{ .ctl_name = 0 }, { .ctl_name = 0 },
}; };
static __net_initdata struct ctl_path ipv4_route_path[] = {
{ .procname = "net", .ctl_name = CTL_NET, },
{ .procname = "ipv4", .ctl_name = NET_IPV4, },
{ .procname = "route", .ctl_name = NET_IPV4_ROUTE, },
{ },
};
static __net_init int sysctl_route_net_init(struct net *net) static __net_init int sysctl_route_net_init(struct net *net)
{ {
struct ctl_table *tbl; struct ctl_table *tbl;
...@@ -3287,7 +3303,7 @@ int __init ip_rt_init(void) ...@@ -3287,7 +3303,7 @@ int __init ip_rt_init(void)
*/ */
void __init ip_static_sysctl_init(void) void __init ip_static_sysctl_init(void)
{ {
register_sysctl_paths(ipv4_route_path, ipv4_route_table); register_sysctl_paths(ipv4_path, ipv4_skeleton);
} }
#endif #endif
......
...@@ -156,7 +156,7 @@ static struct ctl_table_header *ip6_base; ...@@ -156,7 +156,7 @@ static struct ctl_table_header *ip6_base;
int ipv6_static_sysctl_register(void) int ipv6_static_sysctl_register(void)
{ {
static struct ctl_table empty[1]; static struct ctl_table empty[1];
ip6_base = register_net_sysctl_rotable(net_ipv6_ctl_path, empty); ip6_base = register_sysctl_paths(net_ipv6_ctl_path, empty);
if (ip6_base == NULL) if (ip6_base == NULL)
return -ENOMEM; return -ENOMEM;
return 0; return 0;
......
...@@ -80,6 +80,10 @@ static struct sctp_auth_bytes *sctp_auth_create_key(__u32 key_len, gfp_t gfp) ...@@ -80,6 +80,10 @@ static struct sctp_auth_bytes *sctp_auth_create_key(__u32 key_len, gfp_t gfp)
{ {
struct sctp_auth_bytes *key; struct sctp_auth_bytes *key;
/* Verify that we are not going to overflow INT_MAX */
if ((INT_MAX - key_len) < sizeof(struct sctp_auth_bytes))
return NULL;
/* Allocate the shared key */ /* Allocate the shared key */
key = kmalloc(sizeof(struct sctp_auth_bytes) + key_len, gfp); key = kmalloc(sizeof(struct sctp_auth_bytes) + key_len, gfp);
if (!key) if (!key)
......
...@@ -3144,6 +3144,11 @@ static int sctp_setsockopt_auth_key(struct sock *sk, ...@@ -3144,6 +3144,11 @@ static int sctp_setsockopt_auth_key(struct sock *sk,
goto out; goto out;
} }
if (authkey->sca_keylength > optlen) {
ret = -EINVAL;
goto out;
}
asoc = sctp_id2assoc(sk, authkey->sca_assoc_id); asoc = sctp_id2assoc(sk, authkey->sca_assoc_id);
if (!asoc && authkey->sca_assoc_id && sctp_style(sk, UDP)) { if (!asoc && authkey->sca_assoc_id && sctp_style(sk, UDP)) {
ret = -EINVAL; ret = -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment