File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -150,18 +150,20 @@ void pidfs_free_pid(struct pid *pid)
150
150
*/
151
151
VFS_WARN_ON_ONCE (pid -> stashed );
152
152
153
- if (IS_ERR (attr ))
154
- return ;
155
-
156
153
/*
157
- * Any dentry must've been wiped from the pid by now. Otherwise
158
- * there's a reference count bug .
154
+ * This if an error occurred during e.g., task creation that
155
+ * causes us to never go through the exit path .
159
156
*/
160
- VFS_WARN_ON_ONCE (pid -> stashed );
157
+ if (unlikely (!attr ))
158
+ return ;
159
+
160
+ /* This never had a pidfd created. */
161
+ if (IS_ERR (attr ))
162
+ return ;
161
163
162
- xattrs = attr -> xattrs ;
164
+ xattrs = no_free_ptr ( attr -> xattrs ) ;
163
165
if (xattrs )
164
- simple_xattrs_free (attr -> xattrs , NULL );
166
+ simple_xattrs_free (xattrs , NULL );
165
167
}
166
168
167
169
#ifdef CONFIG_PROC_FS
You can’t perform that action at this time.
0 commit comments