patch-2.1.118 linux/arch/i386/mm/init.c
Next file: linux/arch/m68k/atari/stram.c
Previous file: linux/arch/i386/lib/usercopy.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Thu Aug 20 16:18:09 1998
- Orig file:
v2.1.117/linux/arch/i386/mm/init.c
- Orig date:
Tue Aug 18 22:02:02 1998
diff -u --recursive --new-file v2.1.117/linux/arch/i386/mm/init.c linux/arch/i386/mm/init.c
@@ -220,7 +220,7 @@
for (idx=1; idx <= __end_of_fixed_addresses; idx += PTRS_PER_PTE)
{
- address = fix_to_virt(__end_of_fixed_addresses-idx);
+ address = __fix_to_virt(__end_of_fixed_addresses-idx);
pg_dir = swapper_pg_dir + (address >> PGDIR_SHIFT);
memset((void *)start_mem, 0, PAGE_SIZE);
pgd_val(*pg_dir) = _PAGE_TABLE | __pa(start_mem);
@@ -246,8 +246,12 @@
void set_fixmap (enum fixed_addresses idx, unsigned long phys)
{
- unsigned long address = fix_to_virt(idx);
+ unsigned long address = __fix_to_virt(idx);
+ if (idx >= __end_of_fixed_addresses) {
+ printk("Invalid set_fixmap\n");
+ return;
+ }
set_pte_phys (address,phys);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov