RE: [PATCH 1/1] scsi_dh: fix boot oops with EMC Clariion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The change was the addition of rq->flags = 0; the memset isn't mine. Sorry about the whitespace -- I'm still a bit new at this. 
As to why it's necessary, I've had boot-time oopses on two completely different hosts -- one iSCSI, one FC -- which both resolved to exactly the same code; bizarre values in rq->flags. The source seems to OR the desired values in but never actually initializes rq->flags (the memset initializes the CDB, not the flags variable), so I added the line to do so. After testing the old module to confirm the oops still occurred regularly, I installed the new code and have since (in over 100 reboots) been unable to reproduce the oops. 

Jerry

-----Original Message-----
From: James Bottomley [mailto:James.Bottomley@xxxxxxxxxxxxxxxxxxxxx]
Sent: Fri 10/17/2008 1:34 PM
To: Levy, Jerome
Cc: linux-scsi@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 1/1] scsi_dh: fix boot oops with EMC Clariion
 
On Mon, 2008-10-13 at 13:41 -0400, Levy_Jerome@xxxxxxx wrote:
> Patch to fix intermittent but frequent oops occurring with multiple
> paths to Clariion at boot. 
> Cause is uninitialized rq->flags variable which presents garbage from
> clariion_activate.

There are several syntactic problems with the patch:  It's against a
pretty old kernel (cmd has been a pointer for a while, so the memset
went away).  It's also whitespace damaged (all tabs have become spaces).

However, I also don't quite understand why this is necessary.  All calls
to blk_get_request() ultimately end up in blk_rq_init() which does a
memset(rq, 0, sizeof(*rq)) which should clear flags.  How is it getting
bogus data?

James

> Signed-off-by: Jerry Levy <levy_jerome@xxxxxxx>
> ---------------------
> --- drivers/scsi/device_handler/scsi_dh_emc.orig        2008-10-13
> 13:33:35.000000000 -0400
> +++ drivers/scsi/device_handler/scsi_dh_emc.c   2008-10-09
> 16:20:15.000000000 -0400
> @@ -283,6 +283,7 @@
>         memset(rq->cmd, 0, BLK_MAX_CDB);
>         rq->cmd[0] = cmd;
>         rq->cmd_len = COMMAND_SIZE(cmd);
> +       rq->flags = 0;
> 
>         switch (cmd) {
>         case MODE_SELECT:
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux