summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Laß2021-10-07 21:12:47 +0200
committerMichael Laß2021-10-07 21:12:47 +0200
commit0dea1e947d12e271fe4fe6bf3e9f507202226c42 (patch)
tree85551bf4e531cb403a20bedefe34a701a7dbfa35
parentc0e04be5cae9da0aa3b1c1f9257523b43f63f428 (diff)
downloadaur-0dea1e947d12e271fe4fe6bf3e9f507202226c42.tar.gz
Fix https://bugs.archlinux.org/task/72340
-rw-r--r--.SRCINFO4
-rw-r--r--0001-LINUX-5.14-explicitly-set-set_page_dirty-to-default.patch61
-rw-r--r--PKGBUILD13
3 files changed, 74 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8c5eef1424f5..ebc5bfca6493 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = openafs-modules
pkgdesc = Kernel module for OpenAFS
pkgver = 1.8.8
- pkgrel = 1
+ pkgrel = 2
url = http://www.openafs.org
install = openafs-modules.install
arch = i686
@@ -15,6 +15,8 @@ pkgbase = openafs-modules
conflicts = openafs<1.6.6-2
options = !emptydirs
source = http://openafs.org/dl/openafs/1.8.8/openafs-1.8.8-src.tar.bz2
+ source = 0001-LINUX-5.14-explicitly-set-set_page_dirty-to-default.patch
sha256sums = daa8ef86a7727facfcde3bc97a6ad143129c1c25ee35f3347080ec7e9d284da0
+ sha256sums = 0e348a09c9c8e5f2989e4e1773e2845898094c29b5bc3b3dbc5adc27c5e35446
pkgname = openafs-modules
diff --git a/0001-LINUX-5.14-explicitly-set-set_page_dirty-to-default.patch b/0001-LINUX-5.14-explicitly-set-set_page_dirty-to-default.patch
new file mode 100644
index 000000000000..d6e6d7e8a233
--- /dev/null
+++ b/0001-LINUX-5.14-explicitly-set-set_page_dirty-to-default.patch
@@ -0,0 +1,61 @@
+From e2efcfb1c34a8f139af3cde474c91b55513d70b8 Mon Sep 17 00:00:00 2001
+From: Cheyenne Wills <cwills@sinenomine.net>
+Date: Thu, 7 Oct 2021 11:15:58 -0600
+Subject: [PATCH] LINUX 5.14: explicitly set set_page_dirty to default
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Linux 5.14 commit: 'mm: require ->set_page_dirty to be explicitly wired
+up' (0af573780b0b13) removed calling __set_page_dirty_buffers when the
+address_space_operations structure member set_page_dirty was NULL.
+
+A kernel RIP error can occur when the set_page_dirty operation is
+requested. (Reproducible by running 'iozone -B -a')
+
+Update the definition for afs_file_aops to explicitly set the
+'set_page_dirty' member to '__set_page_dirty_buffers'.
+
+There are no functional changes, since this commit is using the same
+function that the Linux kernel was using if set_page_dirty had been
+NULL.
+
+Problem originally reported by "Andrej Filipcic"
+<andrej.filipcic@ijs.si> in the openafs-info mailing list. The Linux
+5.14 commit causing the openafs failure was identified by "Michael Laß"
+<lass@mail.upb.de> also on in the openafs-info mailing list.
+
+Note: The declaration for the function '__set_page_dirty_buffers' was
+moved from linux/mm.h into linux/buffer_head.h in Linux 2.6.19. Since
+this is close to the minimum supported Linux version 2.6.18, we are not
+introducing an additional autoconf test to determine which header file
+the declaration for __set_page_dirty_buffers resides in.
+
+Change-Id: I8f2a00e374635ab1aa69d6eaef8cf97bb449d089
+---
+ src/afs/LINUX/osi_vnodeops.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
+index f4bedae0f..00103a538 100644
+--- a/src/afs/LINUX/osi_vnodeops.c
++++ b/src/afs/LINUX/osi_vnodeops.c
+@@ -26,6 +26,7 @@
+ #include "afsincludes.h"
+ #include "afs/afs_stats.h"
+ #include <linux/mm.h>
++#include <linux/buffer_head.h>
+ #ifdef HAVE_MM_INLINE_H
+ #include <linux/mm_inline.h>
+ #endif
+@@ -3287,6 +3288,7 @@ static struct address_space_operations afs_file_aops = {
+ .readpage = afs_linux_readpage,
+ .readpages = afs_linux_readpages,
+ .writepage = afs_linux_writepage,
++ .set_page_dirty = __set_page_dirty_buffers,
+ #if defined (STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_WRITE_BEGIN)
+ .write_begin = afs_linux_write_begin,
+ .write_end = afs_linux_write_end,
+--
+2.33.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 4fb05fa585bf..2d4fe2cb0d57 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=openafs-modules
_srcname=openafs
pkgver=1.8.8
-pkgrel=1
+pkgrel=2
pkgdesc="Kernel module for OpenAFS"
arch=('i686' 'x86_64' 'armv7h')
url="http://www.openafs.org"
@@ -15,9 +15,11 @@ depends=('openafs')
makedepends=('libelf' 'linux-headers')
conflicts=('openafs-features-libafs' 'openafs<1.6.6-2')
options=(!emptydirs)
-source=("http://openafs.org/dl/openafs/${pkgver}/${_srcname}-${pkgver}-src.tar.bz2")
+source=("http://openafs.org/dl/openafs/${pkgver}/${_srcname}-${pkgver}-src.tar.bz2"
+ "0001-LINUX-5.14-explicitly-set-set_page_dirty-to-default.patch")
install=openafs-modules.install
-sha256sums=('daa8ef86a7727facfcde3bc97a6ad143129c1c25ee35f3347080ec7e9d284da0')
+sha256sums=('daa8ef86a7727facfcde3bc97a6ad143129c1c25ee35f3347080ec7e9d284da0'
+ '0e348a09c9c8e5f2989e4e1773e2845898094c29b5bc3b3dbc5adc27c5e35446')
# Heuristic to determine version of installed kernel
# You can modify this if the heuristic fails
@@ -32,6 +34,11 @@ _extramodules="/usr/lib/modules/${_kernelver}/extramodules"
prepare() {
cd "${srcdir}/${_srcname}-${pkgver}"
+ # Fix compatibility with Linux 5.14
+ # Fixes https://bugs.archlinux.org/task/72340
+ # Source: https://gerrit.openafs.org/#/c/14826/1
+ patch -p1 < "${srcdir}"/0001-LINUX-5.14-explicitly-set-set_page_dirty-to-default.patch
+
# Only needed when changes to configure were made
# ./regen.sh -q
}