diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2015-12-21 11:36:21 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-12-21 11:36:21 +0300 |
commit | 0529357f102b96f68bc199f858d1c3b07f4b674c (patch) | |
tree | eaa047952a768099e00a5245afa0d84799df6990 /net/irda/af_irda.c | |
parent | a9f1a3e4c1c7dc82711bc22dc52c7b0d6912ed56 (diff) | |
parent | 4ef7675344d687a0ef5b0d7c0cee12da005870c0 (diff) | |
download | linux-0529357f102b96f68bc199f858d1c3b07f4b674c.tar.xz |
Merge tag 'v4.4-rc6' into devel
Linux 4.4-rc6
Diffstat (limited to 'net/irda/af_irda.c')
-rw-r--r-- | net/irda/af_irda.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index e6aa48b5395c..923abd6b3064 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -1086,6 +1086,9 @@ static int irda_create(struct net *net, struct socket *sock, int protocol, struct sock *sk; struct irda_sock *self; + if (protocol < 0 || protocol > SK_PROTOCOL_MAX) + return -EINVAL; + if (net != &init_net) return -EAFNOSUPPORT; |