proc-ns: Use d_set_d_op() API to set dentry ops in proc_ns_instantiate().
PATCH 1/1 proc-ns: Use d_set_d_op() API to set dentry ops in proc_ns_instantiate().
From: Pravin B Shelar <[email protected]>
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.
--- fs/proc/namespaces.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/proc/namespaces.c +1 -1
@@ -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 ))
Signature · 1 line
1.7.5.4
Quoted 6 lines · Jesse Gross
From: Pravin B Shelar <[email protected]>
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.
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.
Quoted 21 lines
CC Eric W. Biederman <[email protected]>Reported-by Justin Pettit <[email protected]>Signed-off-by Pravin B Shelar <[email protected]>Signed-off-by Jesse Gross <[email protected]>--- fs/proc/namespaces.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/proc/namespaces.c +1
-1@@ -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 ))
Quoted 7 lines · Eric W. Biederman
Quoted 5 lines · Jesse Gross
From: Pravin B Shelar <[email protected]>
Use
d_set_d_op()so that DCACHE_OP_* flags are set correctly which fixes ns cleanup path i.e.ip netns delete.
Quoted 7 lines
Quoted 1 line
This issue exists back to 3.0.
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.)
Quoted 6 lines · On Tue, 13 Mar 2012 19:08:17 -0700 Jesse Gross <[email protected]> wrote:
From: Pravin B Shelar <[email protected]>
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.