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

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 4 as of 2007-08-16 06:22:59
KernelNewbies:
  • KernelJanitors
  • Todo
  • ApiChanges

Remove unneeded historic code / New API conversions.

  • Code that depends on LINUX_VERSION_CODE & KERNEL_VERSION < 2.6 can be

    • deleted in most cases. (Mostly/all? done)
  • checking for NULL on probe routines for net drivers
  • get rid of init_module / cleanup_module
  • call SET_MODULE_OWNER or use .owner = THIS_MODULE instead of using
    • MOD_{INC,DEC}_USE_COUNT (none left in 2.6.22-rc4-mm2)
  • Use pci_set_drvdata() to set dev->driver_data, likewise use pci_get_drvdata() instead of reading directly.

    • - dev->driver_data = pcigame; + pci_set_drvdata(dev, pcigame);

  • get rid of access_ok with copy_*_user get/put_user, only needed if using copy_*_user et al
  • MODULE_PARM must die:
    • [D: http://marc.theaimsgroup.com/?l=linux-kernel&m=109826168201622&w=2]

    • [E: http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/broken-out/remove-module_parm-from-allyesconfig-almost.patch]

    • (only driver that references it is ./drivers/scsi/gdth.c and it wraps it in a KERNEL_VERSION check, so its done)
  • convert drivers to new PCI API
  • get rid of check_region, use just request_region checking its return (2.2 request_region returned void) and now the driver init sequence is not to be serialized anymore, so races are possible (look at cardbus/pcihotplug code)
    • [D: http://lists.osdl.org/pipermail/kernel-janitors/2004-January/000346.html]

  • ALL PCI drivers should call pci_enable_device --before-- reading pdev->irq or pdev->resource[]. irq and resource[] may not have correct values until after PCI hotplug setup occurs at pci_enable_device() time. Many PCI drivers need to be evaluated and checked for this. Many of these fixed already at: http://marc.theaimsgroup.com/?l=linux-kernel&m=98449691919682&w=3

  • convert cli/sti/save_flags/save_flags_cli/restore_flags usage to accepted locking primitives; see Documentation/cli-sti-removal.txt and Documentation/spinlocks.txt for details.
    • [E: http://linux.bkbits.net:8080/linux-2.6/cset@419b78fcaLKtZt39OF_dslTbk-b3KQ?nav=index.html|ChangeSet@-8w]

    • This item is a hard one. Full understanding of what data structures should be protected by introduced locks is required. Testing on real hardware is almost mandatory.
  • yield() considered harmful:
    • [D: http://marc.theaimsgroup.com/?t=106554796200005]

    • Don't forget to set_current_state(TASK_{,UN}INTERRUPTIBLE); before schedule*(). Consider using msleep();.
  • Anything which uses sleep_on*() has a 90% chance of being broken. Fix them all, because we want to remove sleep_on() and friends.
    • [D: http://boudicca.tux.org/hypermail/linux-kernel/2001week05/0305.html]

    • Be sure to read replies too.
  • Callers of schedule_timeout() who pass in an absolute constant (i.e. with no reference to HZ) may be broken, especially with a variable HZ value. Verify which behavior is intended: if the caller needs the shortest delay possible, then schedule_timeout(1) is correct and a comment can be added; if they actually need a certain amount of time, then use msleep() or schedule_timeout with an appropriate {msecs,usecs,nsecs}_to_jiffies() call.
  • Replace (un)register_ioctl32_conversion with ioctl_compat
    • [D: http://lkml.org/lkml/2005/1/5/106]

    • as of 2007/08/16 only ones left are in:
      • {{{Documentation/scsi/ChangeLog.megaraid

drivers/usb/misc/sisusbvga/sisusb.c drivers/video/sis/sis_main.c }}}

  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01