提交 a8eef8a2 编写于 作者: K Kalle Valo 提交者: Jeff Garzik

[PATCH] hostap: Fix null pointer dereference in prism2_pccard_card_present()

With my Buffalo WLI-CF-S11G PC Card kernel oopses every time in
prism2_interrupt() when I try load the hostap module. local->hw_priv is null
during the first call to prism2_interrupt(). It feels like
interrupts are enabled too early, or something.

This patch fixes the symptom, but not the cause.
Signed-off-by: NKalle Valo <Kalle.Valo@iki.fi>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 6c5b90d2
......@@ -212,7 +212,7 @@ static int prism2_event(event_t event, int priority,
static int prism2_pccard_card_present(local_info_t *local)
{
struct hostap_cs_priv *hw_priv = local->hw_priv;
if (hw_priv->link != NULL &&
if (hw_priv != NULL && hw_priv->link != NULL &&
((hw_priv->link->state & (DEV_PRESENT | DEV_CONFIG)) ==
(DEV_PRESENT | DEV_CONFIG)))
return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册