diff -Nru cups-2.0.2/debian/changelog cups-2.0.2/debian/changelog --- cups-2.0.2/debian/changelog 2015-06-04 08:39:32.000000000 -0300 +++ cups-2.0.2/debian/changelog 2015-06-12 13:19:21.000000000 -0300 @@ -1,3 +1,10 @@ +cups (2.0.2-1ubuntu3.2) vivid-proposed; urgency=medium + + * debian/patches/cups-busy-loop.patch: Fixed scheduler sometimes + getting caught in a busy loop (LP: #1426490, CUPS STR #4605). + + -- Till Kamppeter Fri, 12 Jun 2015 13:18:01 -0300 + cups (2.0.2-1ubuntu3.1) vivid-security; urgency=medium * SECURITY UPDATE: privilege escalation through dynamic linker and diff -Nru cups-2.0.2/debian/patches/cups-busy-loop.patch cups-2.0.2/debian/patches/cups-busy-loop.patch --- cups-2.0.2/debian/patches/cups-busy-loop.patch 1969-12-31 21:00:00.000000000 -0300 +++ cups-2.0.2/debian/patches/cups-busy-loop.patch 2015-06-12 13:10:04.000000000 -0300 @@ -0,0 +1,38 @@ +Description: Fixes a busy loop in CUPS 2.0.2 +Bug: https://www.cups.org/str.php?L4605 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1426490 +Author: Tim Waugh +Last-Update: 2015-06-12 +--- a/scheduler/client.c ++++ b/scheduler/client.c +@@ -590,6 +590,17 @@ + * connection and we need to shut it down... + */ + ++ if (!httpGetReady(con->http) && recv(httpGetFd(con->http), buf, 1, MSG_PEEK) < 1) ++ { ++ /* ++ * Connection closed... ++ */ ++ ++ cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on EOF."); ++ cupsdCloseClient(con); ++ return; ++ } ++ + cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on unexpected HTTP read state %s.", + httpStateString(httpGetState(con->http))); + cupsdCloseClient(con); +@@ -1984,12 +1995,6 @@ + + if (httpGetState(con->http) == HTTP_STATE_POST_SEND) + { +- /* +- * Don't listen for activity until we decide to do something with this... +- */ +- +- cupsdAddSelect(httpGetFd(con->http), NULL, NULL, con); +- + if (con->file >= 0) + { + fstat(con->file, &filestats); diff -Nru cups-2.0.2/debian/patches/series cups-2.0.2/debian/patches/series --- cups-2.0.2/debian/patches/series 2015-06-04 08:36:44.000000000 -0300 +++ cups-2.0.2/debian/patches/series 2015-06-12 13:09:34.000000000 -0300 @@ -54,3 +54,4 @@ # queue to catch all Debian-specific changes manpage-translations.patch str4609.patch +cups-busy-loop.patch