aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/hamradio/hdlcdrv.c
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2014-01-22 11:06:54 -0600
committerGary S. Robertson <gary.robertson@linaro.org>2014-01-22 11:06:54 -0600
commita7fd051cd1119af788dd161a4c834b06377d76a8 (patch)
tree80368fccae171d1b0446f3e2b4fd4d9b43e65cbe /drivers/net/hamradio/hdlcdrv.c
parent00629ac158e1be3124b796078cf0347b946cb053 (diff)
parent1071ea6e68ead40df739b223e9013d99c23c19ab (diff)
Merge tag 'v3.10.27' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-lnglinux-lng-3.10.27-2014.02
This is the 3.10.27 stable release
Diffstat (limited to 'drivers/net/hamradio/hdlcdrv.c')
-rw-r--r--drivers/net/hamradio/hdlcdrv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c
index 3169252613fa..5d78c1d08abd 100644
--- a/drivers/net/hamradio/hdlcdrv.c
+++ b/drivers/net/hamradio/hdlcdrv.c
@@ -571,6 +571,8 @@ static int hdlcdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
case HDLCDRVCTL_CALIBRATE:
if(!capable(CAP_SYS_RAWIO))
return -EPERM;
+ if (bi.data.calibrate > INT_MAX / s->par.bitrate)
+ return -EINVAL;
s->hdlctx.calibrate = bi.data.calibrate * s->par.bitrate / 16;
return 0;