- acpi-initialise-cm_sbs_sem.patch removed from -mm tree

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

 



The patch titled

     acpi: initialise cm_sbs_sem

has been removed from the -mm tree.  Its filename is

     acpi-initialise-cm_sbs_sem.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: acpi: initialise cm_sbs_sem
From: Andrew Morton <akpm@xxxxxxxx>

cm_sbs_sem is being downed (via acpi_ac_init->acpi_lock_ac_dir) before it is
initialised, with grave results.

- Make it a mutex

- Initialise it

- Make it static

- Clean other stuff up.

Thanks to Paul Drynoff <pauldrynoff@xxxxxxxxx> for reporting and testing.

Cc: "Brown, Len" <len.brown@xxxxxxxxx>
Cc: Rich Townsend <rhdt@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/acpi/cm_sbs.c |   46 ++++++++++++----------------------------
 1 file changed, 14 insertions(+), 32 deletions(-)

diff -puN drivers/acpi/cm_sbs.c~acpi-initialise-cm_sbs_sem drivers/acpi/cm_sbs.c
--- a/drivers/acpi/cm_sbs.c~acpi-initialise-cm_sbs_sem
+++ a/drivers/acpi/cm_sbs.c
@@ -39,50 +39,43 @@ ACPI_MODULE_NAME("cm_sbs")
 static struct proc_dir_entry *acpi_ac_dir;
 static struct proc_dir_entry *acpi_battery_dir;
 
-static struct semaphore cm_sbs_sem;
+static DEFINE_MUTEX(cm_sbs_mutex);
 
-static int lock_ac_dir_cnt = 0;
-static int lock_battery_dir_cnt = 0;
+static int lock_ac_dir_cnt;
+static int lock_battery_dir_cnt;
 
 struct proc_dir_entry *acpi_lock_ac_dir(void)
 {
-
-	down(&cm_sbs_sem);
-	if (!acpi_ac_dir) {
+	mutex_lock(&cm_sbs_mutex);
+	if (!acpi_ac_dir)
 		acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir);
-	}
 	if (acpi_ac_dir) {
 		lock_ac_dir_cnt++;
 	} else {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
 				  "Cannot create %s\n", ACPI_AC_CLASS));
 	}
-	up(&cm_sbs_sem);
+	mutex_unlock(&cm_sbs_mutex);
 	return acpi_ac_dir;
 }
-
 EXPORT_SYMBOL(acpi_lock_ac_dir);
 
 void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir_param)
 {
-
-	down(&cm_sbs_sem);
-	if (acpi_ac_dir_param) {
+	mutex_lock(&cm_sbs_mutex);
+	if (acpi_ac_dir_param)
 		lock_ac_dir_cnt--;
-	}
 	if (lock_ac_dir_cnt == 0 && acpi_ac_dir_param && acpi_ac_dir) {
 		remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir);
 		acpi_ac_dir = 0;
 	}
-	up(&cm_sbs_sem);
+	mutex_unlock(&cm_sbs_mutex);
 }
-
 EXPORT_SYMBOL(acpi_unlock_ac_dir);
 
 struct proc_dir_entry *acpi_lock_battery_dir(void)
 {
-
-	down(&cm_sbs_sem);
+	mutex_lock(&cm_sbs_mutex);
 	if (!acpi_battery_dir) {
 		acpi_battery_dir =
 		    proc_mkdir(ACPI_BATTERY_CLASS, acpi_root_dir);
@@ -93,39 +86,28 @@ struct proc_dir_entry *acpi_lock_battery
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
 				  "Cannot create %s\n", ACPI_BATTERY_CLASS));
 	}
-	up(&cm_sbs_sem);
+	mutex_unlock(&cm_sbs_mutex);
 	return acpi_battery_dir;
 }
-
 EXPORT_SYMBOL(acpi_lock_battery_dir);
 
 void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir_param)
 {
-
-	down(&cm_sbs_sem);
-	if (acpi_battery_dir_param) {
+	mutex_lock(&cm_sbs_mutex);
+	if (acpi_battery_dir_param)
 		lock_battery_dir_cnt--;
-	}
 	if (lock_battery_dir_cnt == 0 && acpi_battery_dir_param
 	    && acpi_battery_dir) {
 		remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir);
 		acpi_battery_dir = 0;
 	}
-	up(&cm_sbs_sem);
+	mutex_unlock(&cm_sbs_mutex);
 	return;
 }
-
 EXPORT_SYMBOL(acpi_unlock_battery_dir);
 
 static int __init acpi_cm_sbs_init(void)
 {
-
-	if (acpi_disabled)
-		return 0;
-
-	init_MUTEX(&cm_sbs_sem);
-
 	return 0;
 }
-
 subsys_initcall(acpi_cm_sbs_init);
_

Patches currently in -mm which might be from akpm@xxxxxxxx are

origin.patch
dont-select-config_hotplug.patch
x86_64-e820c-needs-pgtableh.patch
count_vm_events-fix.patch
add-computone-intelliport-plus-serial-hotplug-support.patch
add-specialix-io8-card-support-hotplug-support.patch
fadvise-remove-dead-comments.patch
vt-remove-vt-specific-declarations-and-definitions-from.patch
tty-remove-include-of-screen_infoh-from-ttyh.patch
md-include-sector-number-in-messages-about-corrected-read-errors.patch
md-oops-workaround.patch
disable-debugging-version-of-write_lock.patch
git-acpi.patch
acpi-asus-s3-resume-fix-fix.patch
sony_apci-resume.patch
kauditd_thread-warning-fix.patch
revert-gregkh-driver-class_device_rename-remove.patch
revert-gregkh-driver-network-class_device-to-device.patch
add-__must_check-to-device-management-code.patch
add-config_enable_must_check.patch
v4l-dev2-handle-__must_check.patch
videodev-check-return-values.patch
git-geode-fixup.patch
git-gfs2.patch
git-gfs2-fixup.patch
git-ia64.patch
git-ia64-fixup.patch
git-ieee1394-fixup.patch
git-input.patch
git-input-list_for_each_entry-fix.patch
git-input-list_for_each_entry-fix-fix.patch
git-klibc.patch
git-hdrcleanup-vs-git-klibc-on-ia64.patch
git-hdrcleanup-vs-git-klibc-on-ia64-2.patch
git-libata-all.patch
sata-is-bust-on-s390.patch
e1000-irq-naming-update.patch
8139cp-printk-fix.patch
82596-section-fixes.patch
ac3200-section-fixes.patch
cops-section-fix.patch
cs89x0-section-fix.patch
at1700-section-fix.patch
e2100-section-fix.patch
eepro-section-fix.patch
eexpress-section-fix.patch
es3210-section-fix.patch
eth16i-section-fix.patch
lance-section-fix.patch
lne390-section-fix.patch
ni52-section-fix.patch
ibmtr-section-fix.patch
smctr-section-fix.patch
wd-section-fix.patch
ni65-section-fix.patch
seeq8005-section-fix.patch
winbond-840-section-fix.patch
fealnx-section-fix.patch
sundance-section-fix.patch
drivers-net-ns83820c-add-paramter-to-disable-auto.patch
git-pcmcia-fixup.patch
git-powerpc-briq_panel-Kconfig-fix.patch
git-sas.patch
git-serial.patch
serial-fix-uart_bug_txen-test.patch
revert-gregkh-pci-pci-test-that-drivers-properly-call-pci_set_master.patch
revert-VIA-quirk-fixup-additional-PCI-IDs.patch
revert-PCI-quirk-VIA-IRQ-fixup-should-only-run-for-VIA-southbridges.patch
git-s390-fixup.patch
git-scsi-rc-fixes.patch
NCR_D700-section-fix.patch
areca-raid-linux-scsi-driver.patch
areca-raid-linux-scsi-driver-update7-fix.patch
git-scsi-target-fixup.patch
sparc64-of_device_register-error-checking-fix.patch
pm-usb-hcds-use-pm_event_prethaw-fix.patch
kill-usb-kconfig-warning.patch
rtl8150_disconnect-needs-tasklet_kill.patch
git-supertrak-fixup.patch
bcm43xx-opencoded-locking.patch
sleazy-fpu-feature-x86_64-support.patch
x86_64-wire-up-oops_enter-oops_exit.patch
adix-tree-rcu-lockless-readside-update-tidy.patch
mm-tracking-shared-dirty-pages-checks.patch
mm-tracking-shared-dirty-pages-wimp.patch
convert-i386-numa-kva-space-to-bootmem-tidy.patch
acx1xx-wireless-driver.patch
tiacx-pci-build-fix.patch
tiacx-ia64-fix.patch
tiacx-build-fix.patch
binfmt_elf-consistently-use-loff_t.patch
fdpic-move-roundup-into-linux-kernelh-fix.patch
get_cmos_time-locking-fix.patch
swsusp-warning-fix.patch
swsusp-write-timer.patch
swsusp-write-speedup.patch
swsusp-read-timer.patch
swsusp-read-speedup.patch
swsusp-read-speedup-fix.patch
swsusp-read-speedup-cleanup.patch
swsusp-read-speedup-cleanup-2.patch
uml-timer-initialization-cleanup-fix.patch
uml-move-_kernc-files-fix.patch
deprecate-smbfs-in-favour-of-cifs.patch
edac-new-opteron-athlon64-memory-controller-driver-tidy.patch
x86-microcode-microcode-driver-cleanup-tidy.patch
x86-microcode-add-sysfs-and-hotplug-support-fix.patch
x86-microcode-add-sysfs-and-hotplug-support-fix-fix.patch
add-address_space_operationsbatch_write.patch
add-address_space_operationsbatch_write-fix.patch
fix-weird-logic-in-alloc_fdtable.patch
alloc_fdtable-cleanup.patch
led-class-support-for-soekris-net48xx-fix.patch
led-class-support-for-soekris-net48xx-fix-fix.patch
led-class-support-for-soekris-net48xx-fix-fix-fix.patch
pc8736x_gpio-fix-re-modprobe-errors-fix-finish-cdev-init-tidy.patch
revert-pcmcia-make-ide_cs-work-with-the-memory-space-of-cf-cards-if-io-space-is-not-available.patch
checklist-update.patch
reiserfs-on-demand-bitmap-loading.patch
per-task-delay-accounting-taskstats-interface.patch
per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays.patch
delay-accounting-taskstats-interface-send-tgid-once.patch
per-task-delay-accounting-taskstats-interface-control-exit-data-through-cpumasks-fix.patch
task-watchers-task-watchers.patch
task-watchers-add-support-for-per-task-watchers.patch
swap_prefetch-vs-zoned-counters.patch
ecryptfs-mmap-operations.patch
ecryptfs-alpha-build-fix.patch
ecryptfs-more-elegant-aes-key-size-manipulation.patch
ecryptfs-get_sb_dev-fix.patch
namespaces-add-nsproxy-dont-include-compileh.patch
namespaces-utsname-switch-to-using-uts-namespaces.patch
namespaces-utsname-use-init_utsname-when-appropriate.patch
namespaces-utsname-implement-utsname-namespaces.patch
namespaces-utsname-sysctl-hack.patch
ipc-namespace-core.patch
readahead-sysctl-parameters-fix.patch
make-copy_from_user_inatomic-not-zero-the-tail-on-i386-vs-reiser4.patch
reiser4-hardirq-include-fix.patch
reiser4-run-truncate_inode_pages-in-reiser4_delete_inode.patch
reiser4-get_sb_dev-fix.patch
reiser4-vs-zoned-allocator.patch
hpt3xx-rework-rate-filtering-tidy.patch
cirrus-logic-framebuffer-i2c-support-fix.patch
genirq-convert-the-i386-architecture-to-irq-chips.patch
genirq-x86_64-irq-reenable-migrating-irqs-to-other-cpus.patch
genirq-msi-simplify-msi-enable-and-disable.patch
genirq-ia64-irq-dynamic-irq-support.patch
genirq-msi-only-build-msi-apicc-on-ia64-fix.patch
genirq-i386-irq-remove-the-msi-assumption-that-irq-==-vector.patch
nr_blockdev_pages-in_interrupt-warning.patch
device-suspend-debug.patch
revert-tty-buffering-comment-out-debug-code.patch
slab-leaks3-default-y.patch
x86-kmap_atomic-debugging.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux