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-next>] [day] [month] [year] [list]
Message-ID: <20090709104202.GA3434@localdomain.by>
Date:	Thu, 9 Jul 2009 13:42:02 +0300
From:	Sergey Senozhatsky <sergey.senozhatsky@...l.by>
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	Pekka Enberg <penberg@...helsinki.fi>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: kmemeleak BUG: lock held when returning to user space!

Hello.

kernel: [  149.507103] ================================================
kernel: [  149.507113] [ BUG: lock held when returning to user space! ]
kernel: [  149.507119] ------------------------------------------------
kernel: [  149.507127] cat/3279 is leaving the kernel with locks still held!
kernel: [  149.507135] 1 lock held by cat/3279:
kernel: [  149.507141]  #0:  (scan_mutex){+.+.+.}, at: [<c110707c>] kmemleak_open+0x4c/0x80

problem is here:
static int kmemleak_open(struct inode *inode, struct file *file)
{
	int ret = 0;

	if (!atomic_read(&kmemleak_enabled))
		return -EBUSY;

	ret = mutex_lock_interruptible(&scan_mutex);
	if (ret < 0)
		goto out;
	if (file->f_mode & FMODE_READ) {
		ret = seq_open(file, &kmemleak_seq_ops);
		if (ret < 0)
			goto scan_unlock;
	}
>>-	return ret;

scan_unlock:
	mutex_unlock(&scan_mutex);
out:
	return ret;
}

we should not return before mutex_unlock(&scan_mutex);

	Sergey

Download attachment "signature.asc" of type "application/pgp-signature" (316 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ