Re: [PATCH 07/12] be2iscsi: Fix for premature buffer free

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

 



Mike Christie wrote:
> On 06/29/2010 07:00 PM, Jayamohan Kallickal wrote:

> > @@ -160,18 +179,34 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd
> > *sc)
> > 
> >   	spin_unlock_bh(&session->lock);
> >   	inv_tbl = phba->inv_tbl;
> > 
> > -	tag = mgmt_invalidate_icds(phba, inv_tbl, num_invalidate, cid);
> > +	nonemb_cmd.va = pci_alloc_consistent(phba->ctrl.pdev,
> > +				sizeof(struct invalidate_commands_params_in),
> > +				&nonemb_cmd.dma);
> > +	if (nonemb_cmd.va == NULL) {
> > +		SE_DEBUG(DBG_LVL_1,
> > +			 "Failed to allocate memory for"
> > +			 "mgmt_invalidate_icds\n");
> > +		return -1;
> 
> return FAILED.

Why not ENOMEM? That would come into my mind when an allocations fails.

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.


[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