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>] [day] [month] [year] [list]
Message-ID: <20080627165322.GA15798@martell.zuzino.mipt.ru>
Date:	Fri, 27 Jun 2008 20:53:22 +0400
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	akpm@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org, viro@...iv.linux.org.uk
Subject: Re: + proc-always-do-release.patch added to -mm tree

>      proc-always-do-release.patch

Ouch, please fold following incremental patch into it.



Don't add ->release'less PDEs into openers list.

This fixes possible call to NULL if ->release is not needed for some reason.

Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---

 fs/proc/generic.c |    3 +--
 fs/proc/inode.c   |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -797,8 +797,7 @@ continue_removing:
 		pdeo = list_first_entry(&de->pde_openers, struct pde_opener, lh);
 		list_del(&pdeo->lh);
 		spin_unlock(&de->pde_unload_lock);
-		if (pdeo->release)
-			pdeo->release(pdeo->inode, pdeo->file);
+		pdeo->release(pdeo->inode, pdeo->file);
 		kfree(pdeo);
 		spin_lock(&de->pde_unload_lock);
 	}
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -348,7 +348,7 @@ static int proc_reg_open(struct inode *inode, struct file *file)
 		rv = open(inode, file);
 
 	spin_lock(&pde->pde_unload_lock);
-	if (rv == 0) {
+	if (rv == 0 && release) {
 		/* To know what to release. */
 		pdeo->inode = inode;
 		pdeo->file = file;

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