public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: "Yang, Bo" <Bo.Yang@lsi.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	"pterjan@gmail.com" <pterjan@gmail.com>,
	"matthew@wil.cx" <matthew@wil.cx>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"Patro, Sumant" <Sumant.Patro@lsi.com>,
	"bugme-daemon@bugzilla.kernel.org"
	<bugme-daemon@bugzilla.kernel.org>,
	"Austria, Winston" <Winston.Austria@lsi.com>
Subject: Re: [Bugme-new] [Bug 11792] New: Oops when reading /proc/megaraid/hba0/diskdrives-ch*
Date: Wed, 22 Oct 2008 16:20:00 +0200	[thread overview]
Message-ID: <48FF3690.2020806@panasas.com> (raw)
In-Reply-To: <4B6A08C587958942AA3002690DD4F8C32D2C5E4A@cosmail02.lsi.com>

Yang, Bo wrote:
> Thanks TOMM.  If this is the case, it may affect some of other drivers like our 
> MPT and SAS driver.  Is there a way kernel can fix it?
> 
> Thanks,
> 
> Bo Yang
> 

Hi Bo Yang

What are the source files for the MPT and SAS drivers from LSI?
I have made a system wide search for such problems as below and could not
find any more. But I might have missed them. If you tell me the file names
I will inspect more closly.

Thanks
Boaz

> -----Original Message-----
> From: FUJITA Tomonori [mailto:fujita.tomonori@lab.ntt.co.jp]
> Sent: Wednesday, October 22, 2008 9:39 AM
> To: Yang, Bo
> Cc: fujita.tomonori@lab.ntt.co.jp; bharrosh@panasas.com; pterjan@gmail.com; matthew@wil.cx; akpm@linux-foundation.org; linux-scsi@vger.kernel.org; Patro, Sumant; bugme-daemon@bugzilla.kernel.org; Austria, Winston
> Subject: RE: [Bugme-new] [Bug 11792] New: Oops when reading /proc/megaraid/hba0/diskdrives-ch*
> 
> On Wed, 22 Oct 2008 07:03:03 -0600
> "Yang, Bo" <Bo.Yang@lsi.com> wrote:
> 
>> I saw the latest working kernel: 2.6.24 and first failing kernel
>> version: 2.6.27-rc8.  I understand there are lots of changes between
>> those two kernels.  Can you take a look the changes from kernels to
>> find out the root cause?
> 
> Sorry, I didn't explain the possible root cause.
> 
> struct scsi_cmnd in 2.6.25:
> 
> unsigned char cmnd[MAX_COMMAND_SIZE];
> 
> 
> struct scsi_cmnd in 2.6.26:
> 
> unsigned char *cmnd;
> 
> 
> In short, struct scsi_cmnd doesn't have static array for cdb. You need
> to allocate memory for it (the scsi midlayer does for common usage).
> 
> So
> 
> static int
> mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
> {
> ...
>         scb = &adapter->int_scb;
>         memset(scb, 0, sizeof(scb_t));
> 
>         scmd = &adapter->int_scmd;
>         memset(scmd, 0, sizeof(Scsi_Cmnd));
> 
>         sdev = kzalloc(sizeof(struct scsi_device), GFP_KERNEL);
>         scmd->device = sdev;
> 
>         scmd->device->host = adapter->host;
>         scmd->host_scribble = (void *)scb;
>         scmd->cmnd[0] = MEGA_INTERNAL_CMD;
> 
> I suspect that the driver crashes here. My patch adds array to
> adapter_t and use it here.
> 
> After 2.6.25, sense_buffer also is converted from static array to
> pointer. In general, using scsi_allocate_command/scsi_free_command is
> the recommended way to use struct scsi_cmnd.
> 
> So my latest patch removes struct scsi_cmnd in adapter_t and uses the
> API in mega_internal_command().
> 
> 
>> Also if you believe this is the driver issue and need LSI to help,
>> can you report this issue to LSI?
> 
> Yeah, I think that we need to update this driver because of the
> changes to SCSI mid-layer.
> 
> It would be appreciated if you can test my latest path:
> 
> http://marc.info/?l=linux-scsi&m=122467887502481&w=2
> 
> 
> Can you think of this thread as a bug report to LSI?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2008-10-22 14:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-11792-10286@http.bugzilla.kernel.org/>
2008-10-21 19:47 ` [Bugme-new] [Bug 11792] New: Oops when reading /proc/megaraid/hba0/diskdrives-ch* Andrew Morton
2008-10-21 19:54   ` Matthew Wilcox
2008-10-21 20:22     ` Pascal Terjan
2008-10-21 23:08       ` FUJITA Tomonori
2008-10-22  9:04         ` Boaz Harrosh
2008-10-22  9:38           ` FUJITA Tomonori
2008-10-22 10:08             ` Boaz Harrosh
2008-10-22 12:33               ` FUJITA Tomonori
2008-10-22 13:03                 ` Yang, Bo
2008-10-22 13:38                   ` FUJITA Tomonori
2008-10-22 13:59                     ` Yang, Bo
2008-10-22 14:20                       ` Boaz Harrosh [this message]
2008-10-22 14:57                         ` Boaz Harrosh
2008-10-22 15:57                         ` Yang, Bo
2008-10-22 17:31                           ` Boaz Harrosh
2008-10-22 13:51                 ` Boaz Harrosh
2008-10-23 22:49                 ` Pascal Terjan
2008-10-24  0:21                   ` FUJITA Tomonori
2008-10-24 13:31                     ` Yang, Bo
2008-10-30 13:01 Yang, Bo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48FF3690.2020806@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=Bo.Yang@lsi.com \
    --cc=Sumant.Patro@lsi.com \
    --cc=Winston.Austria@lsi.com \
    --cc=akpm@linux-foundation.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=pterjan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox