netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* null dereference in ethoc_probe()
@ 2010-05-22 15:55 Dan Carpenter
  2010-05-24  0:29 ` Thomas Chou
  2010-05-24  2:44 ` [PATCH] ethoc: fix null dereference in ethoc_probe Thomas Chou
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Carpenter @ 2010-05-22 15:55 UTC (permalink / raw)
  To: thomas; +Cc: netdev

The patch 0baa080c75c: "ethoc: use system memory as buffer" introduced a
potential null dereference.

  1060  free:
  1061          if (priv->dma_alloc)
                    ^^^^^^^^^^^^^^^
	priv can be null here.

  1062                  dma_free_coherent(NULL, priv->dma_alloc, priv->membase,
  1063                          netdev->mem_start);
  1064          free_netdev(netdev);

Also I think the error handling is not as complete as it should be.  It
seems like we should call devm_iounmap() and release some of the other
resources as well.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-25  6:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 15:55 null dereference in ethoc_probe() Dan Carpenter
2010-05-24  0:29 ` Thomas Chou
2010-05-24  2:44 ` [PATCH] ethoc: fix null dereference in ethoc_probe Thomas Chou
2010-05-24  6:11   ` David Miller
2010-05-25  6:16   ` [Nios2-dev] " Tobias Klauser
2010-05-25  6:51     ` Thomas Chou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).