Re: SET_MODULE_OWNER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 13, 2004 at 13:12:25 +0530, aksingh@hss.hns.com wrote:
> On Tue, Jul 13, 2004 at 09:14:58 +0530, aksingh@hss.hns.com wrote:
> >   Is it "mandatory" to set the owner of a file operations structure using
> > this macro defined in module.h  ?, doing a normal MOD_INC_USE_COUNT and
> > MOD_DEC_USE_COUNT doesnt this work just fine too .. ..?
> 
> MOD_INC_USE_COUNT and MOD_DEC_USE_COUNT do *NEVER* work.
> >>> never work as in ? the module usage count does increment/decrement
> using these

No. Never work as in don't really prevent it from crashing.

When the module itself does it's own refcounting, there is always
a window, where the count is 0, but code from that module runs. It was
not a problem back on non-preemptible UP kernels, but on SMP and
especialy with preemption, it may cause a crash.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux