mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] proc-ns: Use d_set_d_op() API to set dentry ops in proc_ns_instantiate().
@ 2012-03-14  2:08 Jesse Gross
  2012-03-14 18:43 ` Eric W. Biederman
  2012-03-22 23:17 ` Andrew Morton
  0 siblings, 2 replies; 5+ messages in thread
From: Jesse Gross @ 2012-03-14  2:08 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, Pravin B Shelar, Eric W. Biederman, Justin Pettit

From: Pravin B Shelar <pshelar@nicira.com>

Use d_set_d_op() so that DCACHE_OP_* flags are set correctly which fixes ns
cleanup path i.e. `ip netns delete `.

This issue exists back to 3.0.

CC: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
---
 fs/proc/namespaces.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c
index 27da860..3551f1f 100644
--- a/fs/proc/namespaces.c
+++ b/fs/proc/namespaces.c
@@ -53,7 +53,7 @@ static struct dentry *proc_ns_instantiate(struct inode *dir,
 	ei->ns_ops    = ns_ops;
 	ei->ns	      = ns;
 
-	dentry->d_op = &pid_dentry_operations;
+	d_set_d_op(dentry, &pid_dentry_operations);
 	d_add(dentry, inode);
 	/* Close the race of the process dying before we return the dentry */
 	if (pid_revalidate(dentry, NULL))
-- 
1.7.5.4


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

* Re: [PATCH] proc-ns: Use d_set_d_op() API to set dentry ops in proc_ns_instantiate().
  2012-03-14  2:08 [PATCH] proc-ns: Use d_set_d_op() API to set dentry ops in proc_ns_instantiate() Jesse Gross
@ 2012-03-14 18:43 ` Eric W. Biederman
  2012-03-16 20:34   ` Jesse Gross
  2012-03-22 23:17 ` Andrew Morton
  1 sibling, 1 reply; 5+ messages in thread
From: Eric W. Biederman @ 2012-03-14 18:43 UTC (permalink / raw)
  To: Jesse Gross; +Cc: Andrew Morton, linux-kernel, Pravin B Shelar, Justin Pettit

Jesse Gross <jesse@nicira.com> writes:

> From: Pravin B Shelar <pshelar@nicira.com>
>
> Use d_set_d_op() so that DCACHE_OP_* flags are set correctly which fixes ns
> cleanup path i.e. `ip netns delete `.
>
> This issue exists back to 3.0.

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>

Jesse thanks for picking this up and giving this a push.  This is most
definitely the right fix and it most definitely solves issues.   Somehow
this fix got lost when I sent it to Linus the first time.

> CC: Eric W. Biederman <ebiederm@xmission.com>
> Reported-by: Justin Pettit <jpettit@nicira.com>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
> Signed-off-by: Jesse Gross <jesse@nicira.com>
> ---
>  fs/proc/namespaces.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c
> index 27da860..3551f1f 100644
> --- a/fs/proc/namespaces.c
> +++ b/fs/proc/namespaces.c
> @@ -53,7 +53,7 @@ static struct dentry *proc_ns_instantiate(struct inode *dir,
>  	ei->ns_ops    = ns_ops;
>  	ei->ns	      = ns;
>  
> -	dentry->d_op = &pid_dentry_operations;
> +	d_set_d_op(dentry, &pid_dentry_operations);
>  	d_add(dentry, inode);
>  	/* Close the race of the process dying before we return the dentry */
>  	if (pid_revalidate(dentry, NULL))

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

* Re: [PATCH] proc-ns: Use d_set_d_op() API to set dentry ops in proc_ns_instantiate().
  2012-03-14 18:43 ` Eric W. Biederman
@ 2012-03-16 20:34   ` Jesse Gross
  0 siblings, 0 replies; 5+ messages in thread
From: Jesse Gross @ 2012-03-16 20:34 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Andrew Morton, linux-kernel, Pravin B Shelar, Justin Pettit

On Wed, Mar 14, 2012 at 11:43 AM, Eric W. Biederman
<ebiederm@xmission.com> wrote:
> Jesse Gross <jesse@nicira.com> writes:
>
>> From: Pravin B Shelar <pshelar@nicira.com>
>>
>> Use d_set_d_op() so that DCACHE_OP_* flags are set correctly which fixes ns
>> cleanup path i.e. `ip netns delete `.
>>
>> This issue exists back to 3.0.
>
> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
>
> Jesse thanks for picking this up and giving this a push.  This is most
> definitely the right fix and it most definitely solves issues.   Somehow
> this fix got lost when I sent it to Linus the first time.

Thanks Eric, I didn't realize that you had picked it up the first time
around, which is why I figured that I'd try Andrew.  I haven't heard
anything from him so do you want to take it? (I'm not quite sure who
owns this piece of code, sorry if it's already been handled.)

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

* Re: [PATCH] proc-ns: Use d_set_d_op() API to set dentry ops in proc_ns_instantiate().
  2012-03-14  2:08 [PATCH] proc-ns: Use d_set_d_op() API to set dentry ops in proc_ns_instantiate() Jesse Gross
  2012-03-14 18:43 ` Eric W. Biederman
@ 2012-03-22 23:17 ` Andrew Morton
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2012-03-22 23:17 UTC (permalink / raw)
  To: Jesse Gross
  Cc: linux-kernel, Pravin B Shelar, Eric W. Biederman, Justin Pettit

On Tue, 13 Mar 2012 19:08:17 -0700
Jesse Gross <jesse@nicira.com> wrote:

> From: Pravin B Shelar <pshelar@nicira.com>
> 
> Use d_set_d_op() so that DCACHE_OP_* flags are set correctly which fixes ns
> cleanup path i.e. `ip netns delete `.
> 
> This issue exists back to 3.0.

What does "fixes" mean?  Please provide a full description of the
user-visible impact of the bug, so that others can ascertain whether
the patch will fix a problem which they're seeing and so that people
like me can work out which kernel versions we should merge it into.

Thanks.


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

* [PATCH] proc-ns: Use d_set_d_op() API to set dentry ops in proc_ns_instantiate().
@ 2012-02-23  4:05 Pravin B Shelar
  0 siblings, 0 replies; 5+ messages in thread
From: Pravin B Shelar @ 2012-02-23  4:05 UTC (permalink / raw)
  To: jpettit, ebiederm, linux-kernel; +Cc: jesse, Pravin B Shelar

Use d_set_d_op() so that DCACHE_OP_* flags are set correctly which fixes ns
cleanup path i.e. `ip netns delete `.

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>

---
 fs/proc/namespaces.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c
index 27da860..3551f1f 100644
--- a/fs/proc/namespaces.c
+++ b/fs/proc/namespaces.c
@@ -53,7 +53,7 @@ static struct dentry *proc_ns_instantiate(struct inode *dir,
 	ei->ns_ops    = ns_ops;
 	ei->ns	      = ns;
 
-	dentry->d_op = &pid_dentry_operations;
+	d_set_d_op(dentry, &pid_dentry_operations);
 	d_add(dentry, inode);
 	/* Close the race of the process dying before we return the dentry */
 	if (pid_revalidate(dentry, NULL))
-- 
1.7.1


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

end of thread, other threads:[~2012-03-22 23:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-14  2:08 [PATCH] proc-ns: Use d_set_d_op() API to set dentry ops in proc_ns_instantiate() Jesse Gross
2012-03-14 18:43 ` Eric W. Biederman
2012-03-16 20:34   ` Jesse Gross
2012-03-22 23:17 ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2012-02-23  4:05 Pravin B Shelar

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

Powered by JetHome