netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cxgbi: fix uninitialized flowi6
@ 2016-04-22 11:09 Jiri Benc
  2016-04-25 20:21 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Benc @ 2016-04-22 11:09 UTC (permalink / raw)
  To: linux-scsi; +Cc: netdev, James E.J. Bottomley, Martin K. Petersen, Anish Bhatt

ip6_route_output looks into different fields in the passed flowi6 structure,
yet cxgbi passes garbage in nearly all those fields. Zero the structure out
first.

Fixes: fc8d0590d9142 ("libcxgbi: Add ipv6 api to driver")
Signed-off-by: Jiri Benc <jbenc@redhat.com>
---
 drivers/scsi/cxgbi/libcxgbi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index f3bb7af4e984..ead83a24bcd1 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -688,6 +688,7 @@ static struct rt6_info *find_route_ipv6(const struct in6_addr *saddr,
 {
 	struct flowi6 fl;
 
+	memset(&fl, 0, sizeof(fl));
 	if (saddr)
 		memcpy(&fl.saddr, saddr, sizeof(struct in6_addr));
 	if (daddr)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cxgbi: fix uninitialized flowi6
  2016-04-22 11:09 [PATCH] cxgbi: fix uninitialized flowi6 Jiri Benc
@ 2016-04-25 20:21 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-04-25 20:21 UTC (permalink / raw)
  To: jbenc; +Cc: linux-scsi, netdev, jejb, martin.petersen, anish

From: Jiri Benc <jbenc@redhat.com>
Date: Fri, 22 Apr 2016 13:09:13 +0200

> ip6_route_output looks into different fields in the passed flowi6 structure,
> yet cxgbi passes garbage in nearly all those fields. Zero the structure out
> first.
> 
> Fixes: fc8d0590d9142 ("libcxgbi: Add ipv6 api to driver")
> Signed-off-by: Jiri Benc <jbenc@redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-25 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-22 11:09 [PATCH] cxgbi: fix uninitialized flowi6 Jiri Benc
2016-04-25 20:21 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).