• Immutable Page
  • Info
  • Attachments


Make sure calls to certain functions are matched by the relevant function at other end of the function, and also during ALL failure/early return paths.


  • pci_alloc_consistent() and pci_free_consistent()

  • ioremap() must be balanced by an iounmap() (this causes a memory leak).

  • check for balanced *_lock_* and *_unlock_* along all paths in a function

    • (can cause dead-lock if not).

  • Make sure no-one is freeing skbs with kfree instead of kfree_skb

  • check that net_device interrupt functions use dev_kfree_skb_irq and not just dev_kfree_skb

  • Make sure reference counts are not leaked by accident. (forgetting to fput(), ...)

Tell others about this page:

last edited 2006-10-18 05:26:23 by ip-81-11-192-250