[arch-commits] Commit in linux-lts/trunk (2 files)

Andreas Radke andyrtr at archlinux.org
Wed Oct 7 20:26:34 UTC 2015


    Date: Wednesday, October 7, 2015 @ 22:26:33
  Author: andyrtr
Revision: 248471

upgpkg: linux-lts 4.1.10-2

fix inet deadlock - FS#46570

Added:
  linux-lts/trunk/0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff
Modified:
  linux-lts/trunk/PKGBUILD

-------------------------------------------------------------+
 0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff |   37 ++++++++++
 PKGBUILD                                                    |   11 ++
 2 files changed, 45 insertions(+), 3 deletions(-)

Added: 0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff
===================================================================
--- 0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff	                        (rev 0)
+++ 0001_inet_fix_potential_deadlock_in_reqsk_queue_unlink.diff	2015-10-07 20:26:33 UTC (rev 248471)
@@ -0,0 +1,37 @@
+From 83fccfc3940c4a2db90fd7e7079f5b465cd8c6af Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <edumazet at 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 at google.com>
+Signed-off-by: David S. Miller <davem at 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
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-10-07 19:22:32 UTC (rev 248470)
+++ PKGBUILD	2015-10-07 20:26:33 UTC (rev 248471)
@@ -5,7 +5,7 @@
 pkgbase=linux-lts
 _srcname=linux-4.1
 pkgver=4.1.10
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 url="http://www.kernel.org/"
 license=('GPL2')
@@ -17,7 +17,8 @@
         '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'
@@ -26,7 +27,8 @@
             'a3a17dec60161aa885c372a5edaa047f5e43044a66a5088e19392986eb8ea1a8'
             '70842d2c2bc56f4520bc021786e386634cb1b7adbfbdf704d048aefa65d59aa2'
             '1f036f7464da54ae510630f0edb69faa115287f86d9f17641197ffda8cfd49e0'
-            '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99')
+            '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
+            'fd5dcb1847fc22f36892673066c801e818dce42d1f709dafa9f12bf8337024f3')
 validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds <torvalds at linux-foundation.org>
               '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman (Linux kernel stable release signing key) <greg at kroah.com>
              )
@@ -40,6 +42,9 @@
 
   # 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



More information about the arch-commits mailing list