Message ID | 20170714120720.906842-7-arnd@arndb.de |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp888919obm; Fri, 14 Jul 2017 05:10:27 -0700 (PDT) X-Received: by 10.84.129.71 with SMTP id 65mr15982755plb.183.1500034227485; Fri, 14 Jul 2017 05:10:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500034227; cv=none; d=google.com; s=arc-20160816; b=enugQqA2jqNtZ6iOZIuGvC3+0R5OInwP0lMh/crPQbhTUpltF4hoqhfqmDv6yaTDqf XlR1DfLp9+uAu6i1No7CPmEz2Ju8b/vCi1FAPmLMAJnmOosuMs+A2ekDrZaeJgXMLeHX RHBFIUTx6zfJ5YEGp/dfbvVQExMxZwbk5cK2PrqC94jY02Kb3uWR1C+3HI9oGneBk3lM 1PFAILwLf5zFCrcWA7LmQd7hIuFErUr/ka+t71i7T9gmvfl3Lbi2ix7ADAlIvtL+y6GO JwVYJg4aB3Zl3UcxpL5ShEAm7I1xfWX2a9dukGVgfzP0jeWDB/mF8EGcZzrVJ+vc+hL2 k32w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=czp2rtMrftSkyZai6xbFNQMXtNUdKJmCYi4bYRSOQIc=; b=K3VHQcn75jaKoPjdCozORte9A/XoHFEsjKbvOYpOyfSO2f+9gB/rkpTMTMlHOusGye A9qom7OFRLIoB35p7XIOqn3fIOFOUkUCfH0ZmiSjutRZu8omA5/Wp6uHwsygK7jKk4aW gFlwr/Bz3Q2pFvy3PWYr2fGRQbZhi/WYzH6RyppUnnzMraTaxEKccnfMNUCTzJ92TqOl O9o/A1eKwk3gbigDP4WpThXyyxFh2ijLN0T/xLzgE1SNpmiiWYqaUCpq+BicE3KNXcA1 u31A0L5iy7MdvPBlvf1D7BFtRsWOpK9VJp4gXG+NA6gbQLetk3b36FGCsHPXo1GOXqU6 X5tA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2si6374184pfg.259.2017.07.14.05.10.26; Fri, 14 Jul 2017 05:10:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932180AbdGNMKJ (ORCPT <rfc822;georgi.djakov@linaro.org> + 25 others); Fri, 14 Jul 2017 08:10:09 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:63447 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753573AbdGNMKF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 14 Jul 2017 08:10:05 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MMnSJ-1da6X11woZ-008eE4; Fri, 14 Jul 2017 14:08:56 +0200 From: Arnd Bergmann <arnd@arndb.de> To: linux-kernel@vger.kernel.org, Satish Kharat <satishkh@cisco.com>, Sesidhar Baddela <sebaddel@cisco.com>, Karan Tilak Kumar <kartilak@cisco.com>, "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Linus Torvalds <torvalds@linux-foundation.org>, Guenter Roeck <linux@roeck-us.net>, akpm@linux-foundation.org, netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>, linux-scsi@vger.kernel.org, x86@kernel.org, Arnd Bergmann <arnd@arndb.de> Subject: [PATCH 06/22] scsi: fnic: fix format string overflow warning Date: Fri, 14 Jul 2017 14:06:58 +0200 Message-Id: <20170714120720.906842-7-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170714120720.906842-1-arnd@arndb.de> References: <20170714120720.906842-1-arnd@arndb.de> X-Provags-ID: V03:K0:AUW5c3mSXTSMFJD3X7qOLGQOyqS5fTSIKfLFi0PJh7HSONdJ373 2VlhNiULcHTh6Z/U7DDv7EHeZLOJUyJ+UdT42R3Uh7FZCSiuXc3ef5B6xT9hy3y415H1DbO r0aXVxk1IDpB08IDdoIefmGfOLiAEm/hmsOGA2wlSkHltuzBj4BhY7HQWuOu4yRpmoKCx05 q1A7TEaaFFdlbgvD5ve2A== X-UI-Out-Filterresults: notjunk:1; V01:K0:vx6N5lFRUsU=:Ihl63tpDqES3qT4X6sb8Mb jK/CQwD7LB4ZQio1XKi4XAYYxU1ecXuKjK0XcDjINtM81pYCHnPUkeIEcjh8tWNMChNk2hm5K u9g+ehbhgecLRnKIbRs7rSmfZ9jv9HZYWu+mZ/BHOgkaBFhL0jKAE8SiH6JIi997PSkk+6Zng 33uB3jFgYQOZUG4qQbAP99M+DeskTuqUWMYUPt4+9ctUoFk1vhbu3CSrkdvyQmiKX2TVI/TAH rPKRVP10vPQ3O6xu4lhuj9wRbs6mGnngFzGBnnk2e2g2EGBRhHieJGx3BtWzMIh+2KBbcJuBK +LJmAtnFIoQQwjLZ4WpCWOo+VMmS+j8UlRNXzrrn58k0+DkONf3RdcME+98AKKg5ZfFZJPP+4 pDP32PMVPRb5va/+2j0fdr4RG7JtkOrbMIKfj7fkxDP0pi9UX+iNbwuHu2WwAZd8Y2Ca/DzMh 7f61klBJMxE7787but+dY4u+ldlU38hDFl5zB7R9Rg+q2jUZkBoZ8MY+Qr9Aalot/JgHNFkc4 r2zExX01+2qX3Gt4F4yoseQQfMJ3DdG7LOIZ4zs/yFOhaEozLVQOaoFBFMbj6jtEcm4jP0x1r JCgthbHrA81a/9b33HLmCayGGq+ZL7s1Eac167lBpQQLRiNEM+TAp0APRkoNYJmYrZIiN2Em+ dGlC0k0b4DwcMm/MHrw0kzIs1+zOnytsQ7w1EoEQOBNAMTdRPASMjOn/ueRrxCl/RLiRULoXS iM+hGv0AIUN4iy7yB4j64HrLIflBPlp/z4kTNA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
gcc-7 -Wformat-* warnings
|
expand
|
diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h index 67aab965c0f4..d094ba59ed15 100644 --- a/drivers/scsi/fnic/fnic.h +++ b/drivers/scsi/fnic/fnic.h @@ -180,7 +180,7 @@ enum fnic_msix_intr_index { struct fnic_msix_entry { int requested; - char devname[IFNAMSIZ]; + char devname[IFNAMSIZ + 11]; irqreturn_t (*isr)(int, void *); void *devid; };
The MSI interrupt name can require 11 bytes in addition to the device name, for a total of 23 bytes: drivers/scsi/fnic/fnic_isr.c: In function 'fnic_request_intr': drivers/scsi/fnic/fnic_isr.c:192:4: error: '-fcs-rq' directive writing 7 bytes into a region of size between 5 and 16 [-Werror=format-overflow=] "%.11s-fcs-rq", fnic->name); drivers/scsi/fnic/fnic_isr.c:206:3: note: 'sprintf' output between 12 and 23 bytes into a destination of size 16 sprintf(fnic->msix[FNIC_MSIX_ERR_NOTIFY].devname, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%.11s-err-notify", fnic->name); This extends the buffer to fit any possible value. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/scsi/fnic/fnic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0