From: Al Viro Date: Sun, 5 Jun 2011 00:37:35 +0000 (+0000) Subject: get_net_ns_by_fd() oopses if proc_ns_fget() returns an error X-Git-Tag: v3.0-rc3~13^2~34 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c316e6a3084cef1a5857cd66bb5429c969f06c93;p=pandora-kernel.git get_net_ns_by_fd() oopses if proc_ns_fget() returns an error BTW, looking through the code related to struct net lifetime rules has caught something else: struct net *get_net_ns_by_fd(int fd) { ... file = proc_ns_fget(fd); if (!file) goto out; ei = PROC_I(file->f_dentry->d_inode); while in proc_ns_fget() we have two return ERR_PTR(...) and not a single path that would return NULL. The other caller of proc_ns_fget() treats ERR_PTR() correctly... Signed-off-by: Al Viro Signed-off-by: David S. Miller --- Reading git-diff-tree failed