On Nov 15, 2007 9:58 AM, Tomas Carnecky <tom@dbservice.com> wrote:The oops will not happen when you remove the module but later. Consider you have a process connected to /dev/input/eventX corresponding to your input device. Opening evdev node pins in memory (kref is taken) underlying input_dev which in turn pins parent platform device. This does not increase your module's reference count so it still can be unloaded. When you unload the module memory occupied by tyou module is freed and may be reused for something else. Now the process that had event device opened decides to close it. This causes krefs dropped from parent input device and platform device structures. Cleanup routines will run trying to scrub everything clean, writing either into freed memory, or, even worse, into memory now occupied by somethign else. BOOM! Yes. Make the structures dynamically alloocated and feel safe from any changes in refcounting between underlying objects. -- Dmitry -
| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Linus Torvalds | Re: Slow DOWN, please!!! |
| Tony Lindgren | [PATCH 37/90] ARM: OMAP: MPUIO wake updates |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Alexey Dobriyan | Re: [GIT]: Networking |
| Dushan Tcholich | Re: ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1 |
