diff options
author | dysphoria | 2015-10-10 10:54:35 +0100 |
---|---|---|
committer | dysphoria | 2015-10-10 10:54:35 +0100 |
commit | 8297bbc73d8bd6243afb64cd8b1a27b9286795eb (patch) | |
tree | fa27e296a6428ff72fe1fe85e6ae6c0b2df12500 | |
parent | 89a722b54e7f7966815a67212d3acc0bc90b67d0 (diff) | |
download | aur-8297bbc73d8bd6243afb64cd8b1a27b9286795eb.tar.gz |
[fix] inet deadlock (FS#46570)
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | 0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff | 37 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-rw-r--r-- | config | 5 | ||||
-rw-r--r-- | config.x86_64 | 5 |
5 files changed, 70 insertions, 20 deletions
@@ -1,6 +1,6 @@ pkgbase = linux-lts-tomoyo - pkgver = 4.1.8 - pkgrel = 1 + pkgver = 4.1.10 + pkgrel = 2 url = http://www.kernel.org/ arch = i686 arch = x86_64 @@ -15,20 +15,22 @@ pkgbase = linux-lts-tomoyo options = !strip source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.tar.xz source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.tar.sign - source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.1.8.xz - source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.1.8.sign + source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.1.10.xz + source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.1.10.sign source = config source = config.x86_64 source = linux-lts-tomoyo.preset source = change-default-console-loglevel.patch + source = 0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff sha256sums = caf51f085aac1e1cea4d00dbbf3093ead07b551fc07b31b2a989c05f8ea72d9f sha256sums = SKIP - sha256sums = 4373af2baaae5429be37e5257a22454d468f36b1322f784bb91a608c80ed52a1 + sha256sums = 929e210fe6dbd5dd26812c146630be14e979aae6c960a2feb39544babb8e73cb sha256sums = SKIP - sha256sums = 53141e415a1b66f211510337fea60587a9255b6b0324ee44531441a4a77523ca - sha256sums = a17e6924fca734dbb473d61d5ab005d73303b1ac6c02b51204111c6b5032489c + sha256sums = a3a17dec60161aa885c372a5edaa047f5e43044a66a5088e19392986eb8ea1a8 + sha256sums = 70842d2c2bc56f4520bc021786e386634cb1b7adbfbdf704d048aefa65d59aa2 sha256sums = 4e1fcb722d069ce8bf8c4e720e42a400a91b9aa73304d8a47e34814b5fd210db sha256sums = 1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99 + sha256sums = fd5dcb1847fc22f36892673066c801e818dce42d1f709dafa9f12bf8337024f3 pkgname = linux-lts-tomoyo pkgdesc = The Linux-lts-tomoyo kernel and modules @@ -38,20 +40,20 @@ pkgname = linux-lts-tomoyo depends = kmod depends = mkinitcpio>=0.7 optdepends = crda: to set the correct wireless channels of your country - provides = kernel26-lts-tomoyo=4.1.8 + provides = kernel26-lts-tomoyo=4.1.10 conflicts = kernel26-lts-tomoyo replaces = kernel26-lts-tomoyo backup = etc/mkinitcpio.d/linux-lts-tomoyo.preset pkgname = linux-lts-tomoyo-headers pkgdesc = Header files and scripts for building modules for Linux-lts-tomoyo kernel - provides = kernel26-lts-tomoyo-headers=4.1.8 + provides = kernel26-lts-tomoyo-headers=4.1.10 conflicts = kernel26-lts-tomoyo-headers replaces = kernel26-lts-tomoyo-headers pkgname = linux-lts-tomoyo-docs pkgdesc = Kernel hackers manual - HTML documentation that comes with the Linux-lts-tomoyo kernel - provides = kernel26-lts-tomoyo-docs=4.1.8 + provides = kernel26-lts-tomoyo-docs=4.1.10 conflicts = kernel26-lts-tomoyo-docs replaces = kernel26-lts-tomoyo-docs diff --git a/0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff b/0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff new file mode 100644 index 000000000000..e5c38d40b07c --- /dev/null +++ b/0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff @@ -0,0 +1,37 @@ +From 83fccfc3940c4a2db90fd7e7079f5b465cd8c6af Mon Sep 17 00:00:00 2001 +From: Eric Dumazet <edumazet@google.com> +Date: Thu, 13 Aug 2015 15:44:51 -0700 +Subject: inet: fix potential deadlock in reqsk_queue_unlink() + +When replacing del_timer() with del_timer_sync(), I introduced +a deadlock condition : + +reqsk_queue_unlink() is called from inet_csk_reqsk_queue_drop() + +inet_csk_reqsk_queue_drop() can be called from many contexts, +one being the timer handler itself (reqsk_timer_handler()). + +In this case, del_timer_sync() loops forever. + +Simple fix is to test if timer is pending. + +Fixes: 2235f2ac75fd ("inet: fix races with reqsk timers") +Signed-off-by: Eric Dumazet <edumazet@google.com> +Signed-off-by: David S. Miller <davem@davemloft.net> + +diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c +index 05e3145..1349571 100644 +--- a/net/ipv4/inet_connection_sock.c ++++ b/net/ipv4/inet_connection_sock.c +@@ -593,7 +593,7 @@ static bool reqsk_queue_unlink(struct request_sock_queue *queue, + } + + spin_unlock(&queue->syn_wait_lock); +- if (del_timer_sync(&req->rsk_timer)) ++ if (timer_pending(&req->rsk_timer) && del_timer_sync(&req->rsk_timer)) + reqsk_put(req); + return found; + } +-- +cgit v0.10.2 + @@ -8,8 +8,8 @@ pkgbase=linux-lts-tomoyo _srcname=linux-4.1 -pkgver=4.1.8 -pkgrel=1 +pkgver=4.1.10 +pkgrel=2 arch=('i686' 'x86_64') url="http://www.kernel.org/" license=('GPL2') @@ -22,16 +22,18 @@ source=(https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign} 'config' 'config.x86_64' # standard config files for mkinitcpio ramdisk "$pkgbase.preset" - 'change-default-console-loglevel.patch') + 'change-default-console-loglevel.patch' + '0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff') # https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc sha256sums=('caf51f085aac1e1cea4d00dbbf3093ead07b551fc07b31b2a989c05f8ea72d9f' 'SKIP' - '4373af2baaae5429be37e5257a22454d468f36b1322f784bb91a608c80ed52a1' + '929e210fe6dbd5dd26812c146630be14e979aae6c960a2feb39544babb8e73cb' 'SKIP' - '53141e415a1b66f211510337fea60587a9255b6b0324ee44531441a4a77523ca' - 'a17e6924fca734dbb473d61d5ab005d73303b1ac6c02b51204111c6b5032489c' + 'a3a17dec60161aa885c372a5edaa047f5e43044a66a5088e19392986eb8ea1a8' + '70842d2c2bc56f4520bc021786e386634cb1b7adbfbdf704d048aefa65d59aa2' '4e1fcb722d069ce8bf8c4e720e42a400a91b9aa73304d8a47e34814b5fd210db' - '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99') + '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99' + 'fd5dcb1847fc22f36892673066c801e818dce42d1f709dafa9f12bf8337024f3') validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds <torvalds@linux-foundation.org> '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com> ) @@ -46,6 +48,9 @@ prepare() { # add latest fixes from stable queue, if needed # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git + # fix network deadlocks; FS#46570 + patch -p1 -i ${srcdir}/0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff + # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param) # remove this when a Kconfig knob is made available by upstream # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) @@ -59,7 +64,7 @@ prepare() { # Enable TOMOYO Linux msg "Enabling TOMOYO Linux..." - sed -i -e 's:# CONFIG_SECURITY_TOMOYO is not set:CONFIG_SECURITY_TOMOYO=y\nCONFIG_SECURITY_TOMOYO_MAX_ACCEPT_ENTRY=2048\nCONFIG_SECURITY_TOMYO_MAX_AUDIT_LOG=1024\n# CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER is not set\nCONFIG_SECURITY_TOMOYO_POLICY_LOADER="/sbin/tomoyo-init"\nCONFIG_SECURITY_TOMOYO_ACTIVATION_TRIGGER="/sbin/init":' \ + sed -i -e 's,# CONFIG_SECURITY_TOMOYO is not set,CONFIG_SECURITY_TOMOYO=y\nCONFIG_SECURITY_TOMOYO_MAX_ACCEPT_ENTRY=2048\nCONFIG_SECURITY_TOMYO_MAX_AUDIT_LOG=1024\n# CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER is not set\nCONFIG_SECURITY_TOMOYO_POLICY_LOADER="/sbin/tomoyo-init"\nCONFIG_SECURITY_TOMOYO_ACTIVATION_TRIGGER="/usr/lib/systemd/systemd",' \ -i -e 's/CONFIG_DEFAULT_SECURITY_DAC=y/# CONFIG_DEFAULT_SECURITY_DAC is not set/' \ -i -e '/CONFIG_DEFAULT_SECURITY=/ s,"","tomoyo",' ./.config @@ -447,10 +447,13 @@ CONFIG_X86_ESPFIX32=y CONFIG_TOSHIBA=m CONFIG_I8K=m CONFIG_X86_REBOOTFIXUPS=y -CONFIG_MICROCODE=m +CONFIG_MICROCODE=y CONFIG_MICROCODE_INTEL=y CONFIG_MICROCODE_AMD=y CONFIG_MICROCODE_OLD_INTERFACE=y +CONFIG_MICROCODE_INTEL_EARLY=y +CONFIG_MICROCODE_AMD_EARLY=y +CONFIG_MICROCODE_EARLY=y CONFIG_X86_MSR=m CONFIG_X86_CPUID=m # CONFIG_NOHIGHMEM is not set diff --git a/config.x86_64 b/config.x86_64 index 66695c6d64a7..8be0464f038c 100644 --- a/config.x86_64 +++ b/config.x86_64 @@ -446,10 +446,13 @@ CONFIG_X86_16BIT=y CONFIG_X86_ESPFIX64=y CONFIG_X86_VSYSCALL_EMULATION=y CONFIG_I8K=m -CONFIG_MICROCODE=m +CONFIG_MICROCODE=y CONFIG_MICROCODE_INTEL=y CONFIG_MICROCODE_AMD=y CONFIG_MICROCODE_OLD_INTERFACE=y +CONFIG_MICROCODE_INTEL_EARLY=y +CONFIG_MICROCODE_AMD_EARLY=y +CONFIG_MICROCODE_EARLY=y CONFIG_X86_MSR=m CONFIG_X86_CPUID=m CONFIG_ARCH_PHYS_ADDR_T_64BIT=y |