summaryrefslogtreecommitdiff
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-07-22 00:44:59 -0700
committerDavid S. Miller <davem@davemloft.net>2014-07-22 00:44:59 -0700
commit8fd90bb889635fa1e7f80a3950948cc2e74c1446 (patch)
tree1490343b5ad9f88b9333e53fa9457c00cbf6c2d1 /drivers/net/wan
parent1bb4238b17b5de6cdc120970a9d00dd8a44f40df (diff)
parent15ba2236f3556fc01b9ca91394465152b5ea74b6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/infiniband/hw/cxgb4/device.c The cxgb4 conflict was simply overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/x25_asy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index df6c07357556..5c47b011a9d7 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -122,8 +122,12 @@ static int x25_asy_change_mtu(struct net_device *dev, int newmtu)
{
struct x25_asy *sl = netdev_priv(dev);
unsigned char *xbuff, *rbuff;
- int len = 2 * newmtu;
+ int len;
+ if (newmtu > 65534)
+ return -EINVAL;
+
+ len = 2 * newmtu;
xbuff = kmalloc(len + 4, GFP_ATOMIC);
rbuff = kmalloc(len + 4, GFP_ATOMIC);