1. 09 Jul, 2010 2 commits
  2. 18 Jun, 2010 2 commits
    • Jiri Slaby's avatar
      x86-64, mm: Initialize VDSO earlier on 64 bits · d7a0380d
      Jiri Slaby authored
      When initrd is in use and a driver does request_module() in its
      module_init (i.e. __initcall or device_initcall), a modprobe process
      is created with VDSO mapping. But VDSO is inited even in __initcall,
      i.e. on the same level (at the same time), so it may not be inited
      yet (link order matters).
      
      Move the VDSO initialization code earlier by switching to something
      before rootfs_initcall where initrd is loaded as rootfs. Specifically
      to subsys_initcall. Do it for standard 64-bit path (init_vdso_vars)
      and for compat (sysenter_setup), just in case people have 32-bit
      initrd and ia32 emulation built-in.
      
      i386 (pure 32-bit) is not affected, since sysenter_setup() is called
      from check_bugs()->identify_boot_cpu() in start_kernel() before
      rest_init()->kernel_thread(kernel_init) where even kernel_init() calls
      do_basic_setup()->do_initcalls().
      
      What this patch fixes are early modprobe crashes such as:
      Unpacking initramfs...
      Freeing initrd memory: 9324k freed
      modprobe[368]: segfault at 7fff4429c020 ip 00007fef397e160c \
          sp 00007fff442795c0 error 4 in ld-2.11.2.so[7fef397df000+1f000]
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      LKML-Reference: <1276720242-13365-1-git-send-email-jslaby@suse.cz>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      d7a0380d
    • Marcin Slusarz's avatar
      x86, kmmio/mmiotrace: Fix double free of kmmio_fault_pages · 8b8f79b9
      Marcin Slusarz authored
      After every iounmap mmiotrace has to free kmmio_fault_pages, but
      it can't do it directly, so it defers freeing by RCU.
      
      It usually works, but when mmiotraced code calls ioremap-iounmap
      multiple times without sleeping between (so RCU won't kick in
      and start freeing) it can be given the same virtual address, so
      at every iounmap mmiotrace will schedule the same pages for
      release. Obviously it will explode on second free.
      
      Fix it by marking kmmio_fault_pages which are scheduled for
      release and not adding them second time.
      Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
      Tested-by: default avatarMarcin Kocielnicki <koriakin@0x04.net>
      Tested-by: default avatarShinpei KATO <shinpei@il.is.s.u-tokyo.ac.jp>
      Acked-by: default avatarPekka Paalanen <pq@iki.fi>
      Cc: Stuart Bennett <stuart@freedesktop.org>
      Cc: Marcin Kocielnicki <koriakin@0x04.net>
      Cc: nouveau@lists.freedesktop.org
      Cc: <stable@kernel.org>
      LKML-Reference: <20100613215654.GA3829@joi.lan>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8b8f79b9
  3. 12 Jun, 2010 1 commit
  4. 11 Jun, 2010 34 commits
  5. 10 Jun, 2010 1 commit