Re: [PATCH] SCSI: fix data corruption caused by ses

From: Yinghai Lu
Date: Wed Feb 13 2008 - 18:48:24 EST


On Wednesday 13 February 2008 03:25:27 pm James Bottomley wrote:
> On Tue, 2008-02-12 at 23:10 -0800, Yinghai Lu wrote:
> > if (type_ptr[0] != ENCLOSURE_COMPONENT_DEVICE &&
> > type_ptr[0] != ENCLOSURE_COMPONENT_ARRAY_DEVICE)
> > - continue;
> > + goto next;
> > +
> > ecomp = enclosure_component_register(edev,
> > components++,
> > type_ptr[0],
> > name);
> > +
> > + if (desc_ptr && !IS_ERR(ecomp) && addl_desc_ptr)
> > + ses_process_descriptor(ecomp,
> > + addl_desc_ptr);
> > + next:
> > if (desc_ptr) {
> > desc_ptr += len;
> > - if (!IS_ERR(ecomp))
> > - ses_process_descriptor(ecomp,
> > - addl_desc_ptr);
> >
> > if (addl_desc_ptr)
> > addl_desc_ptr += addl_desc_ptr[1] + 2;
>
> Everything looks fine, thanks, except this piece.
>
> That
>
> if (x)
> goto next;
> ...
> next:
>
> Needs to be
>
> if (!x) {
> ...
> }
>

find other problems about sub_enclosure...

will send you updated one.

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/