projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git]
/
net
/
decnet
/
af_decnet.c
diff --git
a/net/decnet/af_decnet.c
b/net/decnet/af_decnet.c
index
eebf5ac
..
13d6b1a
100644
(file)
--- a/
net/decnet/af_decnet.c
+++ b/
net/decnet/af_decnet.c
@@
-678,6
+678,9
@@
static int dn_create(struct net *net, struct socket *sock, int protocol,
{
struct sock *sk;
+ if (protocol < 0 || protocol > SK_PROTOCOL_MAX)
+ return -EINVAL;
+
if (!net_eq(net, &init_net))
return -EAFNOSUPPORT;