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:  <loom.20090706T230728-669@post.gmane.org>
Date:	Mon, 6 Jul 2009 23:12:13 +0000 (UTC)
From:	Parag Warudkar <parag.warudkar@...il.com>
To:	linux-kernel@...r.kernel.org
Subject:  Re: Possible memory leak in fs/sysfs/bin.c

Hi

Catalin Marinas <catalin.marinas <at> arm.com> writes:


> --- a/fs/sysfs/bin.c
> +++ b/fs/sysfs/bin.c
> @@ -164,6 +164,7 @@ static ssize_t write(struct file *file, const char
> __user *userbuf,
>  	mutex_lock(&bb->mutex);
> 
>  	memcpy(bb->buffer, temp, count);
> +	kfree(temp);

Does the kfree() need to be inside the mutex_lock? Otherwise looks OK to me.

Parag




--
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