Page MenuHomeFreeBSD

D3470.id8420.diff
No OneTemporary

D3470.id8420.diff

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

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)

Event Timeline