public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe W Damasio <felipewd@terra.com.br>
To: Lucas Correia Villa Real <lucasvr@gobolinux.org>
Cc: Gobo-l <gobo-l@cscience.org>, linux-kernel@vger.kernel.org
Subject: Re: [gobo-l]Re: [PATCH] gobohide: avoid null pointer accesses
Date: Sun, 17 Aug 2003 17:20:05 -0300	[thread overview]
Message-ID: <3F3FE375.7060309@terra.com.br> (raw)
In-Reply-To: <200308170210.49719.lucasvr@gobolinux.org>

	Greetings,

Lucas Correia Villa Real wrote:
> Oops, sorry. 2.4.20 and/or 2.4.21.

	Ok, things are much clearer now :)

	But I still have some doubts..CC'ing LKML to see if any of those 
hackers can help us.

> int vfs_unlink(struct inode *dir, struct dentry *dentry)
> {
> 	...
> 	down(&dir->i_zombie);
> 	error = may_delete(dir, dentry, 0);
> 	if (!error) {
> 		...
> 		if (!error) {
> 			if (dentry->d_inode && S_ISLNK (dentry->d_inode->i_mode))
> 				if (gobolinux_hide(dentry->d_inode->i_ino) > 0)
> 					gobolinux_inode_del(dentry->d_inode->i_ino)


	Yeah, ok...but I still don't get when a dentry doesn't have a valid 
d_inode why we don't return ENOENT like in sys_unlink:


slashes:
         error = !dentry->d_inode ? -ENOENT :
                 S_ISDIR(dentry->d_inode->i_mode) ? -EISDIR : -ENOTDIR;


	Which, by the way, would be called _instead_ of calling vfs_unlink...so 
should we assume that the dentry _should_ have a valid dinode?

	You said that the kernel oops'ed when unlinking a symlink in a NFS 
partition, right?

	Does anybody know if, in this case (a symlink inside a NFS partition), 
the dentry really doesn't have a valid d_inode entry?

	Thanks,

Felipe
-- 
It's most certainly GNU/Linux, not Linux. Read more at
http://www.gnu.org/gnu/why-gnu-linux.html


           reply	other threads:[~2003-08-17 20:16 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200308170210.49719.lucasvr@gobolinux.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F3FE375.7060309@terra.com.br \
    --to=felipewd@terra.com.br \
    --cc=gobo-l@cscience.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucasvr@gobolinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox