From: Greg Kroah-Hartman Date: Fri, 6 May 2016 16:33:01 +0000 (-0400) Subject: 3.14-stable patches X-Git-Tag: v3.14.69~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c087ab10d4717ee3f1f316b5e14425e6003f104;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: clk-versatile-sp810-support-reentrance.patch ipvs-correct-initial-offset-of-call-id-header-search-in-sip-persistence-engine.patch lpfc-fix-misleading-indentation.patch nbd-ratelimit-error-msgs-after-socket-close.patch --- diff --git a/queue-3.14/clk-versatile-sp810-support-reentrance.patch b/queue-3.14/clk-versatile-sp810-support-reentrance.patch new file mode 100644 index 00000000000..ba7e3ecf7da --- /dev/null +++ b/queue-3.14/clk-versatile-sp810-support-reentrance.patch @@ -0,0 +1,85 @@ +From ec7957a6aa0aaf981fb8356dc47a2cdd01cde03c Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Wed, 24 Feb 2016 09:39:11 +0100 +Subject: clk: versatile: sp810: support reentrance + +From: Linus Walleij + +commit ec7957a6aa0aaf981fb8356dc47a2cdd01cde03c upstream. + +Despite care take to allocate clocks state containers the +SP810 driver actually just supports creating one instance: +all clocks registered for every instance will end up with the +exact same name and __clk_init() will fail. + +Rename the timclken<0> .. timclken to sp810__ +so every clock on every instance gets a unique name. + +This is necessary for the RealView PBA8 which has two SP810 +blocks: the second block will not register its clocks unless +every clock on every instance is unique and results in boot +logs like this: + +------------[ cut here ]------------ +WARNING: CPU: 0 PID: 0 at ../drivers/clk/versatile/clk-sp810.c:137 + clk_sp810_of_setup+0x110/0x154() +Modules linked in: +CPU: 0 PID: 0 Comm: swapper/0 Not tainted +4.5.0-rc2-00030-g352718fc39f6-dirty #225 +Hardware name: ARM RealView Machine (Device Tree Support) +[] (unwind_backtrace) from [] + (show_stack+0x10/0x14) +[] (show_stack) from [] + (dump_stack+0x84/0x9c) +[] (dump_stack) from [] + (warn_slowpath_common+0x74/0xb0) +[] (warn_slowpath_common) from [] + (warn_slowpath_null+0x1c/0x24) +[] (warn_slowpath_null) from [] + (clk_sp810_of_setup+0x110/0x154) +[] (clk_sp810_of_setup) from [] + (of_clk_init+0x12c/0x1c8) +[] (of_clk_init) from [] + (time_init+0x20/0x2c) +[] (time_init) from [] + (start_kernel+0x244/0x3c4) +[] (start_kernel) from [<7000807c>] (0x7000807c) +---[ end trace cb88537fdc8fa200 ]--- + +Cc: Michael Turquette +Cc: Pawel Moll +Fixes: 6e973d2c4385 "clk: vexpress: Add separate SP810 driver" +Signed-off-by: Linus Walleij +Signed-off-by: Stephen Boyd +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/versatile/clk-sp810.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/clk/versatile/clk-sp810.c ++++ b/drivers/clk/versatile/clk-sp810.c +@@ -141,6 +141,7 @@ void __init clk_sp810_of_setup(struct de + const char *parent_names[2]; + char name[12]; + struct clk_init_data init; ++ static int instance; + int i; + + if (!sp810) { +@@ -172,7 +173,7 @@ void __init clk_sp810_of_setup(struct de + init.num_parents = ARRAY_SIZE(parent_names); + + for (i = 0; i < ARRAY_SIZE(sp810->timerclken); i++) { +- snprintf(name, ARRAY_SIZE(name), "timerclken%d", i); ++ snprintf(name, sizeof(name), "sp810_%d_%d", instance, i); + + sp810->timerclken[i].sp810 = sp810; + sp810->timerclken[i].channel = i; +@@ -184,5 +185,6 @@ void __init clk_sp810_of_setup(struct de + } + + of_clk_add_provider(node, clk_sp810_timerclken_of_get, sp810); ++ instance++; + } + CLK_OF_DECLARE(sp810, "arm,sp810", clk_sp810_of_setup); diff --git a/queue-3.14/ipvs-correct-initial-offset-of-call-id-header-search-in-sip-persistence-engine.patch b/queue-3.14/ipvs-correct-initial-offset-of-call-id-header-search-in-sip-persistence-engine.patch new file mode 100644 index 00000000000..365c81cf1e6 --- /dev/null +++ b/queue-3.14/ipvs-correct-initial-offset-of-call-id-header-search-in-sip-persistence-engine.patch @@ -0,0 +1,55 @@ +From 7617a24f83b5d67f4dab1844956be1cebc44aec8 Mon Sep 17 00:00:00 2001 +From: Marco Angaroni +Date: Sat, 5 Mar 2016 12:10:02 +0100 +Subject: ipvs: correct initial offset of Call-ID header search in SIP persistence engine + +From: Marco Angaroni + +commit 7617a24f83b5d67f4dab1844956be1cebc44aec8 upstream. + +The IPVS SIP persistence engine is not able to parse the SIP header +"Call-ID" when such header is inserted in the first positions of +the SIP message. + +When IPVS is configured with "--pe sip" option, like for example: +ipvsadm -A -u 1.2.3.4:5060 -s rr --pe sip -p 120 -o +some particular messages (see below for details) do not create entries +in the connection template table, which can be listed with: +ipvsadm -Lcn --persistent-conn + +Problematic SIP messages are SIP responses having "Call-ID" header +positioned just after message first line: +SIP/2.0 200 OK +[Call-ID header here] +[rest of the headers] + +When "Call-ID" header is positioned down (after a few other headers) +it is correctly recognized. + +This is due to the data offset used in get_callid function call inside +ip_vs_pe_sip.c file: since dptr already points to the start of the +SIP message, the value of dataoff should be initially 0. +Otherwise the header is searched starting from some bytes after the +first character of the SIP message. + +Fixes: 758ff0338722 ("IPVS: sip persistence engine") +Signed-off-by: Marco Angaroni +Acked-by: Julian Anastasov +Signed-off-by: Simon Horman +Signed-off-by: Greg Kroah-Hartman + +--- + net/netfilter/ipvs/ip_vs_pe_sip.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/netfilter/ipvs/ip_vs_pe_sip.c ++++ b/net/netfilter/ipvs/ip_vs_pe_sip.c +@@ -88,7 +88,7 @@ ip_vs_sip_fill_param(struct ip_vs_conn_p + dptr = skb->data + dataoff; + datalen = skb->len - dataoff; + +- if (get_callid(dptr, dataoff, datalen, &matchoff, &matchlen)) ++ if (get_callid(dptr, 0, datalen, &matchoff, &matchlen)) + return -EINVAL; + + /* N.B: pe_data is only set on success, diff --git a/queue-3.14/lpfc-fix-misleading-indentation.patch b/queue-3.14/lpfc-fix-misleading-indentation.patch new file mode 100644 index 00000000000..53bd5a9f764 --- /dev/null +++ b/queue-3.14/lpfc-fix-misleading-indentation.patch @@ -0,0 +1,60 @@ +From aeb6641f8ebdd61939f462a8255b316f9bfab707 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Mon, 14 Mar 2016 15:29:44 +0100 +Subject: lpfc: fix misleading indentation + +From: Arnd Bergmann + +commit aeb6641f8ebdd61939f462a8255b316f9bfab707 upstream. + +gcc-6 complains about the indentation of the lpfc_destroy_vport_work_array() +call in lpfc_online(), which clearly doesn't look right: + +drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_online': +drivers/scsi/lpfc/lpfc_init.c:2880:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] + lpfc_destroy_vport_work_array(phba, vports); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +drivers/scsi/lpfc/lpfc_init.c:2863:2: note: ...this 'if' clause, but it is not + if (vports != NULL) + ^~ + +Looking at the patch that introduced this code, it's clear that the +behavior is correct and the indentation is wrong. + +This fixes the indentation and adds curly braces around the previous +if() block for clarity, as that is most likely what caused the code +to be misindented in the first place. + +Signed-off-by: Arnd Bergmann +Fixes: 549e55cd2a1b ("[SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list") +Reviewed-by: Sebastian Herbszt +Reviewed-by: Hannes Reinecke +Reviewed-by: Ewan D. Milne +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/lpfc/lpfc_init.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/lpfc/lpfc_init.c ++++ b/drivers/scsi/lpfc/lpfc_init.c +@@ -2697,7 +2697,7 @@ lpfc_online(struct lpfc_hba *phba) + } + + vports = lpfc_create_vport_work_array(phba); +- if (vports != NULL) ++ if (vports != NULL) { + for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { + struct Scsi_Host *shost; + shost = lpfc_shost_from_vport(vports[i]); +@@ -2714,7 +2714,8 @@ lpfc_online(struct lpfc_hba *phba) + } + spin_unlock_irq(shost->host_lock); + } +- lpfc_destroy_vport_work_array(phba, vports); ++ } ++ lpfc_destroy_vport_work_array(phba, vports); + + lpfc_unblock_mgmt_io(phba); + return 0; diff --git a/queue-3.14/nbd-ratelimit-error-msgs-after-socket-close.patch b/queue-3.14/nbd-ratelimit-error-msgs-after-socket-close.patch new file mode 100644 index 00000000000..11512336a67 --- /dev/null +++ b/queue-3.14/nbd-ratelimit-error-msgs-after-socket-close.patch @@ -0,0 +1,43 @@ +From da6ccaaa79caca4f38b540b651238f87215217a2 Mon Sep 17 00:00:00 2001 +From: Dan Streetman +Date: Thu, 14 Jan 2016 13:42:32 -0500 +Subject: nbd: ratelimit error msgs after socket close + +From: Dan Streetman + +commit da6ccaaa79caca4f38b540b651238f87215217a2 upstream. + +Make the "Attempted send on closed socket" error messages generated in +nbd_request_handler() ratelimited. + +When the nbd socket is shutdown, the nbd_request_handler() function emits +an error message for every request remaining in its queue. If the queue +is large, this will spam a large amount of messages to the log. There's +no need for a separate error message for each request, so this patch +ratelimits it. + +In the specific case this was found, the system was virtual and the error +messages were logged to the serial port, which overwhelmed it. + +Fixes: 4d48a542b427 ("nbd: fix I/O hang on disconnected nbds") +Signed-off-by: Dan Streetman +Signed-off-by: Markus Pargmann +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/block/nbd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/block/nbd.c ++++ b/drivers/block/nbd.c +@@ -581,8 +581,8 @@ static void do_nbd_request(struct reques + BUG_ON(nbd->magic != NBD_MAGIC); + + if (unlikely(!nbd->sock)) { +- dev_err(disk_to_dev(nbd->disk), +- "Attempted send on closed socket\n"); ++ dev_err_ratelimited(disk_to_dev(nbd->disk), ++ "Attempted send on closed socket\n"); + req->errors++; + nbd_end_request(req); + spin_lock_irq(q->queue_lock);