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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 28 Nov 2012 12:08:55 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	"Yangbin (Robin)" <robin.yb@...wei.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-fs@...r.kernel.org" <linux-fs@...r.kernel.org>
Subject: Re: A question about proc file system

On Wed, 28 Nov 2012 02:55:30 +0000
"Yangbin (Robin)" <robin.yb@...wei.com> wrote:

> Hi all:
> 
> 	I write a kernel module which make a dir and create a file in proc file system. 
> I use proc_mkdir() and create_proc_entry() in init and use remove_proc_entry() in exit.
> Now I got a problem during my test:
> 1. open terminal A, insmod and cd into the dir the module created in proc
> 2. open terminal B. rmmod and insmod angain.
> Then I cannot see the file which should be created by the module, unless terminal A quit the dir.
> 
> This will be ok with regale file system like ext3, one teminal's operation will not affert others.
> Is this a bug or not?

It's not. You are doing the same as this


	mkdir /tmp/example
	cd /tmp/example
	rmdir /tmp/example

	mkdir /tmp/example

in Unix like systems the file handles and current directory references
apply to the object itself not to the path.

When yo reload the driver you create a new and different directory that
has the same name but is not the same thing.

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