The query represents something beautiful: a developer who wants free, high-quality, actionable knowledge. You now have the map.
| Do | Don't | |----|-------| | Validate user input with copy_from_user() | Dereference user pointers directly | | Use GFP_KERNEL only in sleepable contexts | Sleep inside spinlock or interrupt | | Check return codes of kmalloc() | Ignore memory allocation failures | | Use module_param() for safe parameters | Expose arbitrary kernel memory via sysfs | | Release resources in __exit | Forget to free IRQ or memory |
Remember: