projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68cfe9a
)
net: strparser: fix a missing check for create_singlethread_workqueue
author
Kangjie Lu
<kjlu@umn.edu>
Fri, 15 Mar 2019 04:12:06 +0000
(23:12 -0500)
committer
David S. Miller
<davem@davemloft.net>
Fri, 15 Mar 2019 19:51:56 +0000
(12:51 -0700)
In case create_singlethread_workqueue fails, the check returns
an error to callers to avoid potential NULL pointer dereferences.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/strparser/strparser.c
patch
|
blob
|
history
diff --git
a/net/strparser/strparser.c
b/net/strparser/strparser.c
index da1a676860cad3c8a2a95acf11f0e908fe2bc255..860dcfb95ee472fed5d74e6015af2acce178c0a7 100644
(file)
--- a/
net/strparser/strparser.c
+++ b/
net/strparser/strparser.c
@@
-550,6
+550,8
@@
EXPORT_SYMBOL_GPL(strp_check_rcv);
static int __init strp_mod_init(void)
{
strp_wq = create_singlethread_workqueue("kstrp");
+ if (unlikely(!strp_wq))
+ return -ENOMEM;
return 0;
}