[PATCHSET 2/4] sysfs: allow suicide

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

 



Hello, all.

This is the second patchset of four sysfs update patchset series[1]
and to be applied on top of the first patchset[1].

Currently, sysfs files which want to kill themselves should ask
someone else (workqueue) to kill it, which is so inhumane.  This
patchset updates sysfs file implementation such that sysfs files can
commit suicide peacefully.

Global sledgehammer module unload inhibition/delay mechanism is
implemented and used to prevent premature unload while suicide is in
progress.  Suicide attempt is detected by scanning sysfs_buffers for
matching accessor.  If suicide is detected, active references the
accessor were holding are dropped early such that the suiciding node
can be deactivated without deadlock.

As active references go away early, the module basing the code the
accessor is running can go away before it finishes.  Global module
unload inhibition is used here to prevent that until accessor callback
is complete.

This patchset contains the following four patches.

 0001-module-implement-module_inhibit_unload.patch
 0002-sysfs-make-the-sysfs_addrm_cxt-removed-list-FIFO.patch
 0003-sysfs-care-free-suicide-for-sysfs-files.patch
 0004-sysfs-make-suicidal-nodes-just-do-it-directly.patch

0001 needs Rusty Russell's ack.

Thanks.

--
tejun

[1] http://thread.gmane.org/gmane.linux.kernel/582105


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux