projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9507515
)
l2tp: WARN_ON rather than BUG_ON in l2tp_dfs_seq_start
author
Tom Parkin
<tparkin@katalix.com>
Fri, 24 Jul 2020 15:31:50 +0000
(16:31 +0100)
committer
David S. Miller
<davem@davemloft.net>
Sat, 25 Jul 2020 00:19:14 +0000
(17:19 -0700)
l2tp_dfs_seq_start had a BUG_ON to catch a possible programming error in
l2tp_dfs_seq_open.
Since we can easily bail out of l2tp_dfs_seq_start, prefer to do that
and flag the error with a WARN_ON rather than crashing the kernel.
Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_debugfs.c
patch
|
blob
|
blame
|
history
diff --git
a/net/l2tp/l2tp_debugfs.c
b/net/l2tp/l2tp_debugfs.c
index 72ba83aa0eaf063e76d9731793000cd9b57f2ecb..96cb9601c21b736e3670334f6e0a38ebbe6ab9bb 100644
(file)
--- a/
net/l2tp/l2tp_debugfs.c
+++ b/
net/l2tp/l2tp_debugfs.c
@@
-72,7
+72,10
@@
static void *l2tp_dfs_seq_start(struct seq_file *m, loff_t *offs)
if (!pos)
goto out;
- BUG_ON(!m->private);
+ if (WARN_ON(!m->private)) {
+ pd = NULL;
+ goto out;
+ }
pd = m->private;
if (!pd->tunnel)