[PATCH] fix semaphore handling in __unregister_chrdev_region

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

 



Hi,

Maybe this up() should be down() instead?

Best Regards,
Wen-chien Jesse Sung


Signed-off-by: Wen-chien Jesse Sung <[email protected]>
--- linux-2.6.12-git9.orig/fs/char_dev.c	2005-06-28 16:43:27.000000000 +0800
+++ linux-2.6.12-git9/fs/char_dev.c	2005-06-28 16:52:01.000000000 +0800
@@ -150,7 +150,7 @@ __unregister_chrdev_region(unsigned majo
 	struct char_device_struct *cd = NULL, **cp;
 	int i = major_to_index(major);
 
-	up(&chrdevs_lock);
+	down(&chrdevs_lock);
 	for (cp = &chrdevs[i]; *cp; cp = &(*cp)->next)
 		if ((*cp)->major == major &&
 		    (*cp)->baseminor == baseminor &&

[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