* Re: + mpt-fusion-dont-oops-if-numphys==0.patch added to -mm tree [not found] <200802192335.m1JNZ7MV005426@imap1.linux-foundation.org> @ 2008-02-20 2:39 ` James Bottomley 2008-02-20 3:06 ` Krzysztof Oledzki 0 siblings, 1 reply; 5+ messages in thread From: James Bottomley @ 2008-02-20 2:39 UTC (permalink / raw) To: akpm, linux-scsi Cc: mm-commits, olel, Eric.Moore, fujita.tomonori, ole, sathya.prakash On Tue, 2008-02-19 at 15:34 -0800, akpm@linux-foundation.org wrote: > Subject: mpt fusion: don't oops if NumPhys==0 > From: Krzysztof Oledzki <olel@ans.pl> > > Don't oops if NumPhys==0, instead return -ENODEV. > This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=9909 > > Signed-off-by: Krzysztof Piotr Oledzki <ole@ans.pl> > Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> > Cc: James Bottomley <James.Bottomley@HansenPartnership.com> > Cc: Eric Moore <Eric.Moore@lsi.com> > Cc: Sathya Prakash <sathya.prakash@lsi.com> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> > --- > > drivers/message/fusion/mptsas.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff -puN drivers/message/fusion/mptsas.c~mpt-fusion-dont-oops-if-numphys==0 drivers/message/fusion/mptsas.c > --- a/drivers/message/fusion/mptsas.c~mpt-fusion-dont-oops-if-numphys==0 > +++ a/drivers/message/fusion/mptsas.c > @@ -1701,6 +1701,11 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc > if (error) > goto out_free_consistent; > > + if (!buffer->NumPhys) { > + error = -ENODEV; > + goto out_free_consistent; > + } > + > /* save config data */ > port_info->num_phys = buffer->NumPhys; > port_info->phy_info = kcalloc(port_info->num_phys, > _ This is a bit odd ... It looks like a work around for a fusion firmware problem. What's the topology this thing is connected to? James ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: + mpt-fusion-dont-oops-if-numphys==0.patch added to -mm tree 2008-02-20 2:39 ` + mpt-fusion-dont-oops-if-numphys==0.patch added to -mm tree James Bottomley @ 2008-02-20 3:06 ` Krzysztof Oledzki 2008-02-20 3:17 ` Maximilian Wilhelm 0 siblings, 1 reply; 5+ messages in thread From: Krzysztof Oledzki @ 2008-02-20 3:06 UTC (permalink / raw) To: James Bottomley Cc: akpm, linux-scsi, mm-commits, Eric.Moore, fujita.tomonori, ole, sathya.prakash, max [-- Attachment #1: Type: TEXT/PLAIN, Size: 1802 bytes --] On Tue, 19 Feb 2008, James Bottomley wrote: > > On Tue, 2008-02-19 at 15:34 -0800, akpm@linux-foundation.org wrote: >> Subject: mpt fusion: don't oops if NumPhys==0 >> From: Krzysztof Oledzki <olel@ans.pl> >> >> Don't oops if NumPhys==0, instead return -ENODEV. >> This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=9909 >> >> Signed-off-by: Krzysztof Piotr Oledzki <ole@ans.pl> >> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> >> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> >> Cc: Eric Moore <Eric.Moore@lsi.com> >> Cc: Sathya Prakash <sathya.prakash@lsi.com> >> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> >> --- >> >> drivers/message/fusion/mptsas.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff -puN drivers/message/fusion/mptsas.c~mpt-fusion-dont-oops-if-numphys==0 drivers/message/fusion/mptsas.c >> --- a/drivers/message/fusion/mptsas.c~mpt-fusion-dont-oops-if-numphys==0 >> +++ a/drivers/message/fusion/mptsas.c >> @@ -1701,6 +1701,11 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc >> if (error) >> goto out_free_consistent; >> >> + if (!buffer->NumPhys) { >> + error = -ENODEV; >> + goto out_free_consistent; >> + } >> + >> /* save config data */ >> port_info->num_phys = buffer->NumPhys; >> port_info->phy_info = kcalloc(port_info->num_phys, >> _ > > This is a bit odd ... It looks like a work around for a fusion firmware > problem. Workaround or not, the driver should not oops by allocating 0 size memory block and dereferencing it. It used to work in <2.6.23 but not now. > What's the topology this thing is connected to? It is a Dell-1950III server with two 400GB SAS disks (RAID1) installed in a dwo disk SAS backplane. Best regrds, Krzysztof Olędzki ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: + mpt-fusion-dont-oops-if-numphys==0.patch added to -mm tree 2008-02-20 3:06 ` Krzysztof Oledzki @ 2008-02-20 3:17 ` Maximilian Wilhelm 2008-02-20 3:28 ` James Bottomley 0 siblings, 1 reply; 5+ messages in thread From: Maximilian Wilhelm @ 2008-02-20 3:17 UTC (permalink / raw) To: Krzysztof Oledzki Cc: James Bottomley, akpm, linux-scsi, mm-commits, Eric.Moore, fujita.tomonori, ole, sathya.prakash, max Am Wednesday, den 20 February hub Krzysztof Oledzki folgendes in die Tasten: Hi Krzysztof, * Thanks for CC'ing me. > >On Tue, 2008-02-19 at 15:34 -0800, akpm@linux-foundation.org wrote: > >>Subject: mpt fusion: don't oops if NumPhys==0 > >>From: Krzysztof Oledzki <olel@ans.pl> > >> > >>Don't oops if NumPhys==0, instead return -ENODEV. > >>This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=9909 > >> > >>Signed-off-by: Krzysztof Piotr Oledzki <ole@ans.pl> > >>Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> > >>Cc: James Bottomley <James.Bottomley@HansenPartnership.com> > >>Cc: Eric Moore <Eric.Moore@lsi.com> > >>Cc: Sathya Prakash <sathya.prakash@lsi.com> > >>Signed-off-by: Andrew Morton <akpm@linux-foundation.org> > >>--- > >> > >> drivers/message/fusion/mptsas.c | 5 +++++ > >> 1 file changed, 5 insertions(+) > >> > >>diff -puN > >>drivers/message/fusion/mptsas.c~mpt-fusion-dont-oops-if-numphys==0 > >>drivers/message/fusion/mptsas.c > >>--- a/drivers/message/fusion/mptsas.c~mpt-fusion-dont-oops-if-numphys==0 > >>+++ a/drivers/message/fusion/mptsas.c > >>@@ -1701,6 +1701,11 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc > >> if (error) > >> goto out_free_consistent; > >> > >>+ if (!buffer->NumPhys) { > >>+ error = -ENODEV; > >>+ goto out_free_consistent; > >>+ } > >>+ > >> /* save config data */ > >> port_info->num_phys = buffer->NumPhys; > >> port_info->phy_info = kcalloc(port_info->num_phys, > >>_ > > > >This is a bit odd ... It looks like a work around for a fusion firmware > >problem. > Workaround or not, the driver should not oops by allocating 0 size memory > block and dereferencing it. It used to work in <2.6.23 but not now. ACK. Nevertheless my server is working absolutely well with this fix/workaround. No problems at all. > >What's the topology this thing is connected to? > It is a Dell-1950III server with two 400GB SAS disks (RAID1) installed in > a dwo disk SAS backplane. Here it's a Dell 1950 with two 73G SAS disks (RAID1) but having four SAS disk slots. If you need further information about the hardware, just let me know. Ciao Max -- Follow the white penguin. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: + mpt-fusion-dont-oops-if-numphys==0.patch added to -mm tree 2008-02-20 3:17 ` Maximilian Wilhelm @ 2008-02-20 3:28 ` James Bottomley 2008-02-20 18:14 ` Maximilian Wilhelm 0 siblings, 1 reply; 5+ messages in thread From: James Bottomley @ 2008-02-20 3:28 UTC (permalink / raw) To: Maximilian Wilhelm Cc: Krzysztof Oledzki, akpm, linux-scsi, mm-commits, Eric.Moore, fujita.tomonori, ole, sathya.prakash On Wed, 2008-02-20 at 04:17 +0100, Maximilian Wilhelm wrote: > Am Wednesday, den 20 February hub Krzysztof Oledzki folgendes in die Tasten: > > >What's the topology this thing is connected to? > > > It is a Dell-1950III server with two 400GB SAS disks (RAID1) installed in > > a dwo disk SAS backplane. > > Here it's a Dell 1950 with two 73G SAS disks (RAID1) but having four > SAS disk slots. > > If you need further information about the hardware, just let me know. Is that directly connected or via an internal expander? James ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: + mpt-fusion-dont-oops-if-numphys==0.patch added to -mm tree 2008-02-20 3:28 ` James Bottomley @ 2008-02-20 18:14 ` Maximilian Wilhelm 0 siblings, 0 replies; 5+ messages in thread From: Maximilian Wilhelm @ 2008-02-20 18:14 UTC (permalink / raw) To: James Bottomley Cc: Maximilian Wilhelm, Krzysztof Oledzki, akpm, linux-scsi, mm-commits, Eric.Moore, fujita.tomonori, ole, sathya.prakash Am Tuesday, den 19 February hub James Bottomley folgendes in die Tasten: > On Wed, 2008-02-20 at 04:17 +0100, Maximilian Wilhelm wrote: > > Am Wednesday, den 20 February hub Krzysztof Oledzki folgendes in die Tasten: > > > >What's the topology this thing is connected to? > > > It is a Dell-1950III server with two 400GB SAS disks (RAID1) installed in > > > a dwo disk SAS backplane. > > Here it's a Dell 1950 with two 73G SAS disks (RAID1) but having four > > SAS disk slots. > > If you need further information about the hardware, just let me know. > Is that directly connected or via an internal expander? The disks are connected to an expander. Have a look at http://files.rfc2324.org/mptsas_panic/DSC_2133.jpg for a picture. Further questions? Ciao Max -- Follow the white penguin. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-02-20 18:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200802192335.m1JNZ7MV005426@imap1.linux-foundation.org>
2008-02-20 2:39 ` + mpt-fusion-dont-oops-if-numphys==0.patch added to -mm tree James Bottomley
2008-02-20 3:06 ` Krzysztof Oledzki
2008-02-20 3:17 ` Maximilian Wilhelm
2008-02-20 3:28 ` James Bottomley
2008-02-20 18:14 ` Maximilian Wilhelm
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox