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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080519165122.9d94cc1c.akpm@linux-foundation.org>
Date:	Mon, 19 May 2008 16:51:22 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Matthias Kaehlcke <matthias@...hlcke.net>
Cc:	ecashin@...aid.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ATA over Ethernet: Convert emsgs_sema in a completion

On Fri, 16 May 2008 21:11:33 +0200
Matthias Kaehlcke <matthias@...hlcke.net> wrote:

> @@ -216,7 +217,7 @@ aoechr_read(struct file *filp, char __user *buf, size_t cnt, loff_t *off)
>  
>  		spin_unlock_irqrestore(&emsgs_lock, flags);
>  
> -		n = down_interruptible(&emsgs_sema);
> +		n = wait_for_completion_interruptible(&emsgs_comp);

Patch looks OK, but I worry about this code.  Suppose a signal is sent
and we return to userspace with the complete() still outstanding.  Then
someone removes the module.  

Perhaps there is synchronisation code which prevents that crash?
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ