Bug 7701 - raw1394 should in- & decrement refcount of ohci1394 and pcilynx
Summary: raw1394 should in- & decrement refcount of ohci1394 and pcilynx
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: IEEE1394 (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Stefan Richter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-17 12:30 UTC by Stefan Richter
Modified: 2007-02-09 15:39 UTC (History)
0 users

See Also:
Kernel Version: all
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
ieee1394: raw1394: prevent unloading of low-level driver (2.96 KB, patch)
2007-02-03 08:51 UTC, Stefan Richter
Details | Diff

Description Stefan Richter 2006-12-17 12:30:53 UTC
ohci1394 and pcilynx can be unloaded while an application is using a host
adapter through raw1394. This especially happens if dv1394 or video1394 are
unloaded because this decrements ohci1394's use count. The result is inadvertent
loss of functionality or even system-wide lock-up, if ohci1394 is reloaded after
this. http://lkml.org/lkml/2006/12/17/91

I think we should add try_module_get(host->driver->owner) and
module_put(host->driver->owner)
 - either to initiation and release of requests,
 - or to the raw1394_open() and raw1394_release() hooks for all hosts which are
present when the file is opened,
 - or simply to raw1394's add_host() and remove_host() hooks.
Comment 1 Stefan Richter 2007-02-03 08:50:35 UTC
proposed patch posted at
http://thread.gmane.org/gmane.linux.kernel.firewire.devel/9000
Comment 2 Stefan Richter 2007-02-03 08:51:30 UTC
Created attachment 10272 [details]
ieee1394: raw1394: prevent unloading of low-level driver
Comment 3 Stefan Richter 2007-02-09 15:39:57 UTC
patch will appear in 2.6.21-rc1

Note You need to log in before you can comment on or make changes to this bug.