Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41105
b: refs/heads/master
c: ba8379b
h: refs/heads/master
i:
  41103: 6edd0db
v: v3
  • Loading branch information
Chris Wright authored and Linus Torvalds committed Nov 29, 2006
1 parent c8f57f9 commit ca4cb9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 24d7bb3396c51ceb2285e0e7b0c1bd1865652c43
refs/heads/master: ba8379b220509e9448c00a77cf6c15ac2a559cc7
9 changes: 5 additions & 4 deletions trunk/net/bridge/br_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ static int get_fdb_entries(struct net_bridge *br, void __user *userbuf,
{
int num;
void *buf;
size_t size = maxnum * sizeof(struct __fdb_entry);
size_t size;

if (size > PAGE_SIZE) {
size = PAGE_SIZE;
/* Clamp size to PAGE_SIZE, test maxnum to avoid overflow */
if (maxnum > PAGE_SIZE/sizeof(struct __fdb_entry))
maxnum = PAGE_SIZE/sizeof(struct __fdb_entry);
}

size = maxnum * sizeof(struct __fdb_entry);

buf = kmalloc(size, GFP_USER);
if (!buf)
Expand Down

0 comments on commit ca4cb9a

Please sign in to comment.