You need to sign in or sign up before continuing.
提交 7a379558 编写于 作者: T Tom Parkin 提交者: David S. Miller

l2tp: WARN_ON rather than BUG_ON in l2tp_dfs_seq_start

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: NTom Parkin <tparkin@katalix.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 95075150
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册