Re: [PATCH 5/5] aacraid: Check scsi_bios_ptabe return code (Updated)

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

 



On Wed, 2005-11-30 at 20:47 +0100, Arjan van de Ven wrote:
> On Wed, 2005-11-30 at 11:43 -0800, Mark Haverkamp wrote:
> > On Wed, 2005-11-30 at 19:14 +0000, Christoph Hellwig wrote:
> > > On Wed, Nov 30, 2005 at 10:36:42AM -0800, Mark Haverkamp wrote:
> > > > Received from Mark Salyzyn.
> > > > 
> > > > scsi_bios_ptable return value is not being checked in aac_biosparm.
> > > 
> > > should probably go into 2.6.15 after the usual trivial codingstyle fix..
> > > 
> > > >  	buf = scsi_bios_ptable(bdev);
> > > > +	if(buf == NULL)
> > > > +		return 0;
> > > 
> > > 	if (!buf)
> > > 		return 0;
> > OK, here is the updated patch:
> 
> I think your space bar is defective on your keyboard

I guess I need to get that fixed.

> 
> >  	buf = scsi_bios_ptable(bdev);
> > +	if(!buf)
> > +		return 0;
> 
> in linux we put a space between the if and the ()'s
> 
> 

This time for sure?

Received from Mark Salyzyn.

scsi_bios_ptable return value is not being checked in aac_biosparm.

Signed-off-by: Mark Haverkamp <markh@xxxxxxxx>
---
Applies to the scsi-misc-2.6 git tree.


Index: scsi-misc-aac/drivers/scsi/aacraid/linit.c
===================================================================
--- scsi-misc-aac.orig/drivers/scsi/aacraid/linit.c	2005-11-30 10:54:42.000000000 -0800
+++ scsi-misc-aac/drivers/scsi/aacraid/linit.c	2005-11-30 11:57:29.000000000 -0800
@@ -325,6 +325,8 @@
 	 *	translations ( 64/32, 128/32, 255/63 ).
 	 */
 	buf = scsi_bios_ptable(bdev);
+	if (!buf)
+		return 0;
 	if(*(__le16 *)(buf + 0x40) == cpu_to_le16(0xaa55)) {
 		struct partition *first = (struct partition * )buf;
 		struct partition *entry = first;

-- 
Mark Haverkamp <markh@xxxxxxxx>

-
: 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