bug report: netpoll: allow execution of multiple rx_hooks per interface

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dan Carpenter
Date: Saturday, March 6, 2010 - 4:06 am

Hi Dan,

Smatch complains about 508e14b4a4f: netpoll: allow execution of multiple 
rx_hooks per interface

net/core/netpoll.c +840 netpoll_setup(124) error: potential null dereference 'npinfo'.  (kmalloc returns null)
   839          if (!ndev->npinfo) {
   840                  spin_lock_irqsave(&npinfo->rx_lock, flags);

	npinfo can be null here if the kmalloc() failed.

   841                  list_for_each_entry_safe(npe, tmp, &npinfo->rx_np, rx) {
   842                          npe->dev = NULL;
   843                  }
   844                  spin_unlock_irqrestore(&npinfo->rx_lock, flags);
   845
   846                  kfree(npinfo);
   847          }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
bug report: netpoll: allow execution of multiple rx_hooks ..., Dan Carpenter, (Sat Mar 6, 4:06 am)