From f888ba3ce77c66bece3d804caf7d559838209a4a Mon Sep 17 00:00:00 2001 From: "James.Smart@Emulex.Com" <James.Smart@Emulex.Com> Date: Wed, 10 Aug 2005 15:03:01 -0400 Subject: [SCSI] lpfc driver 8.0.30 : fix get_stats panic Fix panic in lpfc_get_stats() Symptoms: Panic on sysfs stats access Cause: In lpfc_get_stats() we are writing to memory that we do not own. Fix: Fix our stats structure allocation. Embed phba->link_stats in struct lpfc_hba and stop treating it like rogue structure. Note: Embedding midlayer/transport structure in our structure caused need for more files to include midlayer/transport headers. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> --- drivers/scsi/lpfc/lpfc_mem.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/scsi/lpfc/lpfc_mem.c') diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c index a5cfb6421fa9..034a8bfa9ac8 100644 --- a/drivers/scsi/lpfc/lpfc_mem.c +++ b/drivers/scsi/lpfc/lpfc_mem.c @@ -23,6 +23,9 @@ #include <linux/pci.h> #include <linux/interrupt.h> +#include <scsi/scsi_device.h> +#include <scsi/scsi_transport_fc.h> + #include "lpfc_hw.h" #include "lpfc_sli.h" #include "lpfc_disc.h" -- cgit v1.2.3