X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fproc_namespace.c;h=1a81373947f33ec4e56b5e34e24814b4c267800a;hb=dafe344d2288f0ebc0e3d4c6a5eb15bc82189c53;hp=439406e081af903a298f6305d9e7c1d744b58813;hpb=825e587af2e90e9b953849f3347a01d8f383d577;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c index 439406e081af..1a81373947f3 100644 --- a/fs/proc_namespace.c +++ b/fs/proc_namespace.c @@ -234,17 +234,12 @@ static int mounts_open_common(struct inode *inode, struct file *file, rcu_read_lock(); nsp = task_nsproxy(task); - if (!nsp) { + if (!nsp || !nsp->mnt_ns) { rcu_read_unlock(); put_task_struct(task); goto err; } ns = nsp->mnt_ns; - if (!ns) { - rcu_read_unlock(); - put_task_struct(task); - goto err; - } get_mnt_ns(ns); rcu_read_unlock(); task_lock(task); @@ -272,6 +267,7 @@ static int mounts_open_common(struct inode *inode, struct file *file, p->root = root; p->m.poll_event = ns->event; p->show = show; + p->cached_event = ~0ULL; return 0;