Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109033858
D3470.id8420.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
786 B
Referenced Files
None
Subscribers
None
D3470.id8420.diff
View Options
Index: head/sys/compat/linux/linux_fork.c
===================================================================
--- head/sys/compat/linux/linux_fork.c
+++ head/sys/compat/linux/linux_fork.c
@@ -285,10 +285,20 @@
p = td->td_proc;
+#ifdef RACCT
+ if (racct_enable) {
+ PROC_LOCK(p);
+ error = racct_add(p, RACCT_NTHR, 1);
+ PROC_UNLOCK(p);
+ if (error != 0)
+ return (EPROCLIM);
+ }
+#endif
+
/* Initialize our td */
error = kern_thr_alloc(p, 0, &newtd);
if (error)
- return (error);
+ goto fail;
cpu_set_upcall(newtd, td);
@@ -369,6 +379,16 @@
td->td_retval[0] = newtd->td_tid;
return (0);
+
+fail:
+#ifdef RACCT
+ if (racct_enable) {
+ PROC_LOCK(p);
+ racct_sub(p, RACCT_NTHR, 1);
+ PROC_UNLOCK(p);
+ }
+#endif
+ return (error);
}
int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 31, 10:17 PM (15 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16370865
Default Alt Text
D3470.id8420.diff (786 B)
Attached To
Mode
D3470: Fix panic with Linux apps and RACCT/RCTL.
Attached
Detach File
Event Timeline
Log In to Comment