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] [day] [month] [year] [list]
Date:	Thu, 30 Jun 2011 19:44:21 +0900
From:	Daisuke Ogino <ogino.daisuke@...fujitsu.com>
To:	linux-kernel@...r.kernel.org
Cc:	linux-pci@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	jbarnes@...tuousgeek.org, hch@...radead.org,
	akpm@...ux-foundation.org, adobriyan@...il.com
Subject: Re: [patch] procfs: returns ENOENT on opening the being-removed proc entry

Hello.

Though I posted the following patch a week ago, 
there is no objection, and Kame-san reviewed it.

I hope merge it by someone if possible.
(I don't find maintainer's name for procfs.)

---
I changed the return value to ENOENT.
This return value is then returned when opening the proc entry 
that have been removed.
For example, open("/proc/bus/pci/XX/YY") during the corresponding 
device is being hot-removed.

Signed-off-by: Daisuke Ogino <ogino.daisuke@...fujitsu.com>
---
 fs/proc/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 74b48cf..7ed72d6 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -319,7 +319,7 @@ static int proc_reg_open(struct inode *inode, struct file *file)
 	if (!pde->proc_fops) {
 		spin_unlock(&pde->pde_unload_lock);
 		kfree(pdeo);
-		return -EINVAL;
+		return -ENOENT;
 	}
 	pde->pde_users++;
 	open = pde->proc_fops->open;
--

Thanks.
-- 
Daisuke Ogino


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