2.1.32 asm/io.h included from userspace

Thomas Sailer (sailer@ife.ee.ethz.ch)
Mon, 07 Apr 1997 13:33:39 +0200

This is a multi-part message in MIME format.

Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Bad things happen if one tries to include asm/io.h from userspace.
The attachement is an ugly "fix" for the worst.
BTW I'm doing this only to get the outb macro, maybe I should
put my own outb macro into my sources?

NOTE: linux/vmalloc.h is included from asm-i386/io.h


Content-Type: text/plain; charset=us-ascii; name="vmallochfix"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="vmallochfix"

--- vmalloc.h.orig Mon Apr 7 12:56:54 1997
+++ vmalloc.h Mon Apr 7 12:57:35 1997
@@ -4,7 +4,9 @@
#include <linux/sched.h>
#include <linux/mm.h>

+#ifdef __KERNEL__
#include <asm/pgtable.h>

struct vm_struct {
unsigned long flags;
@@ -18,6 +20,7 @@
void * vmalloc(unsigned long size);
int vread(char *buf, char *addr, int count);

+#ifdef __KERNEL
extern inline void set_pgdir(unsigned long address, pgd_t entry)
#ifndef __mc68000__
@@ -30,5 +33,7 @@