KernelNewbies
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Kernel Hacking

  • Frontpage

  • Kernel Hacking

  • Kernel Documentation

  • Kernel Glossary

  • FAQ

  • Found a bug?

  • Kernel Changelog

  • Upstream Merge Guide

Projects

  • KernelJanitors

  • KernelMentors

  • KernelProjects

Community

  • Why a community?

  • Regional Kernelnewbies

  • Personal Pages

  • Upcoming Events

References

  • Mailing Lists

  • Related Sites

  • Programming Links

Wiki

  • Recent Changes

  • Site Editors

  • Side Bar

  • Tips for Editors

  • Hosted by WikiWall

Navigation

  • RecentChanges
  • FindPage
  • HelpContents
Revision 2 as of 2006-10-18 05:26:23
KernelNewbies:
  • KernelJanitors
  • Todo
  • FunctionBalancing

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.

Examples:

  • 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(), ...)
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01