]> Zhao Yanbai Git Server - minix.git/commitdiff
Do not report non-safe sys_sdevio calls when the address is 'SELF'
authorPhilip Homburg <philip@cs.vu.nl>
Thu, 13 Jul 2006 14:46:53 +0000 (14:46 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Thu, 13 Jul 2006 14:46:53 +0000 (14:46 +0000)
kernel/system/do_sdevio.c

index 658d81b0ef602eea9b72620a28e4d57aa8bcee70..4d8c9d3d3c0aa8377db969f89facd9ab665c14dc 100644 (file)
@@ -28,13 +28,16 @@ register message *m_ptr;    /* pointer to request message */
   phys_bytes phys_buf;
   int req_type, req_dir;
 
-  if ((m_ptr->DIO_REQUEST & _DIO_SAFEMASK) != _DIO_SAFE)
+  /* Allow safe copies and accesses to SELF */
+  if ((m_ptr->DIO_REQUEST & _DIO_SAFEMASK) != _DIO_SAFE &&
+       proc_nr_e != SELF)
   {
        static int first= 1;
        if (first)
        {
                first= 0;
-               kprintf("do_sdevio: for %d\n", m_ptr->m_source);
+               kprintf("do_sdevio: for %d, req %d\n",
+                       m_ptr->m_source, m_ptr->DIO_REQUEST);
        }
   }