VirtualBox

Opened 8 years ago

Closed 8 years ago

#15298 closed defect (fixed)

Latest Kernel 4.6-rc2 support

Reported by: retro Owned by:
Component: host support Version: VirtualBox 5.0.16
Keywords: Cc:
Guest type: all Host type: Linux

Description

I was trying to compile vboxdrv (5.0.16) against 4.6-rc2 linux kernel, but I was getting following error.

/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:581:21: error: implicit declaration of function 'page_cache_release' [-Werror=implicit-function-declaration]

There was change in linux kernel removing this macro merged recently (thanks to bitlord from #fedora freenode IRC for pointing me to this change).

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a

I was able to compile vboxdrv with attached patch.

I did also quick search about put_page function at http://lxr.free-electrons.com/ident?i=put_page. It seems like old stable part of kernel and it should be supported from 2.6 (as I found that's the oldest kernel branch supported by VirtualBox) until today.

Also I did scan for another change candidates related to that kernel change and I found one in guest additions. Change is also included in attached patch.

Currently I'm testing this change, but after first tests it looks ok and everything works as expected.

Thanks for great opensource project and I hope this report will be useful in any way. Josef ---

Attached patch is released under the following MIT License

COPYRIGHT AND PERMISSION NOTICE

Copyright (c) 2016, Josef Šimánek <josef.simanek@…>.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Attachments (2)

switch_to_put_page.diff (1.3 KB ) - added by retro 8 years ago.
patch to switch from page_cache_release to put_page
5.0.16-2-for-4.6.0-0.rc2.git3.2.fc25.x86_64.failed.log (15.4 KB ) - added by retro 8 years ago.
failed compilation log

Download all attachments as: .zip

Change History (4)

by retro, 8 years ago

Attachment: switch_to_put_page.diff added

patch to switch from page_cache_release to put_page

by retro, 8 years ago

failed compilation log

comment:1 by Frank Mehnert, 8 years ago

Thanks for the 'heads-up'. Linux 4.6 fixes can be found in r60453, r60454, r60455, r60457. These fixes will be part of the next 5.0.x maintenance release.

comment:2 by Frank Mehnert, 8 years ago

Resolution: fixed
Status: newclosed

Fix is part of VBox 5.0.18.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use