public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] DOCUMENTATION: Correct inline docs to match parm name.
@ 2010-11-30 11:31 Robert P. J. Day
  2010-11-30 13:19 ` Paul Bolle
  2010-11-30 16:39 ` Randy Dunlap
  0 siblings, 2 replies; 3+ messages in thread
From: Robert P. J. Day @ 2010-11-30 11:31 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Randy Dunlap


Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

  the actual parameter name is "parent", not "dparent".


diff --git a/fs/dcache.c b/fs/dcache.c
index 23702a9..eaebae4 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1485,7 +1485,7 @@ out:
 /**
  * d_validate - verify dentry provided from insecure source
  * @dentry: The dentry alleged to be valid child of @dparent
- * @dparent: The parent dentry (known to be valid)
+ * @parent: The parent dentry (known to be valid)
  *
  * An insecure source has sent us a dentry, here we verify it and dget() it.
  * This is used by ncpfs in its readdir implementation.

-- 

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] DOCUMENTATION: Correct inline docs to match parm name.
  2010-11-30 11:31 [PATCH] DOCUMENTATION: Correct inline docs to match parm name Robert P. J. Day
@ 2010-11-30 13:19 ` Paul Bolle
  2010-11-30 16:39 ` Randy Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Bolle @ 2010-11-30 13:19 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, Randy Dunlap

On Tue, 2010-11-30 at 06:31 -0500, Robert P. J. Day wrote:
> @@ -1485,7 +1485,7 @@ out:
>  /**
>   * d_validate - verify dentry provided from insecure source
>   * @dentry: The dentry alleged to be valid child of @dparent

Doesn't this one needs to be changed too?

> - * @dparent: The parent dentry (known to be valid)
> + * @parent: The parent dentry (known to be valid)
>   *
>   * An insecure source has sent us a dentry, here we verify it and dget() it.
>   * This is used by ncpfs in its readdir implementation.

By the way, the code currently reads:

int d_validate(struct dentry *dentry, struct dentry *parent)
{
[...]
        rcu_read_lock();
        hlist_for_each_entry_rcu(d, node, head, d_hash) {
                if (d == dentry) {
                        dget(dentry);
                        return 1;
                }
        }
        rcu_read_unlock();
        return 0;
}

I know nothing about rcu_read_lock(), but why is there no
rcu_read_unlock() before the "return 1" case?


Paul Bolle


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] DOCUMENTATION: Correct inline docs to match parm name.
  2010-11-30 11:31 [PATCH] DOCUMENTATION: Correct inline docs to match parm name Robert P. J. Day
  2010-11-30 13:19 ` Paul Bolle
@ 2010-11-30 16:39 ` Randy Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2010-11-30 16:39 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Linux Kernel Mailing List

On Tue, 30 Nov 2010 06:31:07 -0500 (EST) Robert P. J. Day wrote:

> 
> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
> 
> ---
> 
>   the actual parameter name is "parent", not "dparent".
> 
> 
> diff --git a/fs/dcache.c b/fs/dcache.c
> index 23702a9..eaebae4 100644
> --- a/fs/dcache.c
> +++ b/fs/dcache.c
> @@ -1485,7 +1485,7 @@ out:
>  /**
>   * d_validate - verify dentry provided from insecure source
>   * @dentry: The dentry alleged to be valid child of @dparent
> - * @dparent: The parent dentry (known to be valid)
> + * @parent: The parent dentry (known to be valid)
>   *
>   * An insecure source has sent us a dentry, here we verify it and dget() it.
>   * This is used by ncpfs in its readdir implementation.

I've already sent this patch to Al Viro (VFS maintainer).

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-30 16:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-30 11:31 [PATCH] DOCUMENTATION: Correct inline docs to match parm name Robert P. J. Day
2010-11-30 13:19 ` Paul Bolle
2010-11-30 16:39 ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox