public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Question about do_mmap changes
@ 2012-06-04  5:29 Larry Finger
  2012-06-04  6:26 ` Al Viro
  0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2012-06-04  5:29 UTC (permalink / raw)
  To: Al Viro; +Cc: LKML

Al,

In commit e3fc629d7bb70848fbf479688a66d4e76dff46ac in 3.5-rc1, you change 
do_mmap() to static, and use do_mmap_pgoff() instaed. The VirtualBox kernel 
module calls do_mmap(), and no longer compiles. I fixed the compile problem with 
the patch

Index: vboxhost/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
===================================================================
--- vboxhost.orig/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
+++ vboxhost/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
@@ -65,6 +65,13 @@
  # define VBOX_USE_PAE_HACK
  #endif

+/*
+ * 3.5+ kernels no longer have do_mmap(). They need to call
+ * do_mmap_pgoff() instead.
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
+#define do_mmap do_mmap_pgoff
+#endif

  /*******************************************************************************
  *   Structures and Typedefs

================================

Although the code now compiles OK, the link step results in

WARNING: "do_mmap_pgoff" [/usr/share/virtualbox/src/vboxhost/vboxdrv/vboxdrv.ko] 
undefined!
WARNING: "do_munmap" [/usr/share/virtualbox/src/vboxhost/vboxdrv/vboxdrv.ko] 
undefined!

================================

I am not quite sure why do_munmap() is undefined as the symbol is exported; 
however, should do_mmap_pgoff() be exported?

Thanks,

Larry

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-06-04  7:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-04  5:29 Question about do_mmap changes Larry Finger
2012-06-04  6:26 ` Al Viro
2012-06-04  6:37   ` Larry Finger
2012-06-04  6:56     ` Al Viro
2012-06-04  7:27       ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox