process: newproc needs to set the udata ptr for udata ptr using platforms
authorAlan Cox <alan@linux.intel.com>
Mon, 12 Sep 2016 23:19:11 +0000 (00:19 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 12 Sep 2016 23:19:11 +0000 (00:19 +0100)
Kernel/process.c

index bb96b81..5bc3adb 100644 (file)
@@ -219,6 +219,11 @@ void newproc(ptptr p)
        /* Set default priority */
        p->p_priority = MAXTICKS;
 
+       /* For systems where udata is actually a pointer or a register object */
+#ifdef udata
+       p->p_udata = &udata;
+#endif
+
        udata.u_ptab = p;
 
        memset(&udata.u_utime, 0, 4 * sizeof(clock_t)); /* Clear tick counters */