lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 22 May 2007 09:59:01 -0700 From: Arjan van de Ven <arjan@...radead.org> To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org> Cc: matthias.kaehlcke@...il.com Subject: Re: use mutex instead of semaphore in RocketPort driver > > - down_interruptible(&info->write_sem); > + mutex_lock_interruptible(&info->write_mtx); > > #ifdef ROCKET_DEBUG_WRITE > printk(KERN_INFO "rp_write %d chars...", count); > @@ -1773,7 +1776,7 @@ end: > wake_up_interruptible(&tty->poll_wait); > #endif > } > - up(&info->write_sem); > + mutex_unlock(&info->write_mtx); > return retval this code is very very buggy. mutex_lock_interruptible() may not get the mutex in case a signal happens... and yet you unlox the mutex unconditionally!!! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists