diff options
Diffstat (limited to 'net/core/netpoll.c')
| -rw-r--r-- | net/core/netpoll.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 7aa697253765..a58f59b97597 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
| 23 | #include <linux/rcupdate.h> | 23 | #include <linux/rcupdate.h> |
| 24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
| 25 | #include <linux/slab.h> | ||
| 25 | #include <net/tcp.h> | 26 | #include <net/tcp.h> |
| 26 | #include <net/udp.h> | 27 | #include <net/udp.h> |
| 27 | #include <asm/unaligned.h> | 28 | #include <asm/unaligned.h> |
| @@ -614,7 +615,7 @@ void netpoll_print_options(struct netpoll *np) | |||
| 614 | np->name, np->local_port); | 615 | np->name, np->local_port); |
| 615 | printk(KERN_INFO "%s: local IP %pI4\n", | 616 | printk(KERN_INFO "%s: local IP %pI4\n", |
| 616 | np->name, &np->local_ip); | 617 | np->name, &np->local_ip); |
| 617 | printk(KERN_INFO "%s: interface %s\n", | 618 | printk(KERN_INFO "%s: interface '%s'\n", |
| 618 | np->name, np->dev_name); | 619 | np->name, np->dev_name); |
| 619 | printk(KERN_INFO "%s: remote port %d\n", | 620 | printk(KERN_INFO "%s: remote port %d\n", |
| 620 | np->name, np->remote_port); | 621 | np->name, np->remote_port); |
| @@ -661,6 +662,9 @@ int netpoll_parse_options(struct netpoll *np, char *opt) | |||
| 661 | if ((delim = strchr(cur, '@')) == NULL) | 662 | if ((delim = strchr(cur, '@')) == NULL) |
| 662 | goto parse_failed; | 663 | goto parse_failed; |
| 663 | *delim = 0; | 664 | *delim = 0; |
| 665 | if (*cur == ' ' || *cur == '\t') | ||
| 666 | printk(KERN_INFO "%s: warning: whitespace" | ||
| 667 | "is not allowed\n", np->name); | ||
| 664 | np->remote_port = simple_strtol(cur, NULL, 10); | 668 | np->remote_port = simple_strtol(cur, NULL, 10); |
| 665 | cur = delim; | 669 | cur = delim; |
| 666 | } | 670 | } |
| @@ -708,7 +712,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt) | |||
| 708 | return 0; | 712 | return 0; |
| 709 | 713 | ||
| 710 | parse_failed: | 714 | parse_failed: |
| 711 | printk(KERN_INFO "%s: couldn't parse config at %s!\n", | 715 | printk(KERN_INFO "%s: couldn't parse config at '%s'!\n", |
| 712 | np->name, cur); | 716 | np->name, cur); |
| 713 | return -1; | 717 | return -1; |
| 714 | } | 718 | } |
| @@ -735,7 +739,7 @@ int netpoll_setup(struct netpoll *np) | |||
| 735 | npinfo = kmalloc(sizeof(*npinfo), GFP_KERNEL); | 739 | npinfo = kmalloc(sizeof(*npinfo), GFP_KERNEL); |
| 736 | if (!npinfo) { | 740 | if (!npinfo) { |
| 737 | err = -ENOMEM; | 741 | err = -ENOMEM; |
| 738 | goto release; | 742 | goto put; |
| 739 | } | 743 | } |
| 740 | 744 | ||
| 741 | npinfo->rx_flags = 0; | 745 | npinfo->rx_flags = 0; |
| @@ -845,7 +849,7 @@ int netpoll_setup(struct netpoll *np) | |||
| 845 | 849 | ||
| 846 | kfree(npinfo); | 850 | kfree(npinfo); |
| 847 | } | 851 | } |
| 848 | 852 | put: | |
| 849 | dev_put(ndev); | 853 | dev_put(ndev); |
| 850 | return err; | 854 | return err; |
| 851 | } | 855 | } |
