Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236798
b: refs/heads/master
c: 9c150e8
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jan 28, 2011
1 parent 4e8e676 commit 7ef5644
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 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: a4daad6b0923030fbd3b00a01f570e4c3eef446b
refs/heads/master: 9c150e82ac50a611237bbebd508d17f6347d577c
2 changes: 1 addition & 1 deletion trunk/include/net/ip_fib.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct fib_info {
int fib_protocol;
__be32 fib_prefsrc;
u32 fib_priority;
u32 fib_metrics[RTAX_MAX];
u32 *fib_metrics;
#define fib_mtu fib_metrics[RTAX_MTU-1]
#define fib_window fib_metrics[RTAX_WINDOW-1]
#define fib_rtt fib_metrics[RTAX_RTT-1]
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/ipv4/fib_semantics.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ static void free_fib_info_rcu(struct rcu_head *head)
{
struct fib_info *fi = container_of(head, struct fib_info, rcu);

kfree(fi->fib_metrics);
kfree(fi);
}

Expand Down Expand Up @@ -742,6 +743,9 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
fi = kzalloc(sizeof(*fi)+nhs*sizeof(struct fib_nh), GFP_KERNEL);
if (fi == NULL)
goto failure;
fi->fib_metrics = kzalloc(sizeof(u32) * RTAX_MAX, GFP_KERNEL);
if (!fi->fib_metrics)
goto failure;
fib_info_cnt++;

fi->fib_net = hold_net(net);
Expand Down

0 comments on commit 7ef5644

Please sign in to comment.