From: Mike Christie <michaelc@cs.wisc.edu>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: Jayamohan Kalickal <jayamohank@serverengines.com>,
linux-scsi@vger.kernel.org, James.Bottomley@suse.de
Subject: Re: [PATCH 07/12] be2iscsi: Fix for premature buffer free
Date: Mon, 05 Jul 2010 13:58:41 -0500 [thread overview]
Message-ID: <4C322B61.3030802@cs.wisc.edu> (raw)
In-Reply-To: <201007042222.36951.eike-kernel@sf-tec.de>
On 07/04/2010 03:22 PM, Rolf Eike Beer wrote:
> 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.
>
Because that function is called by the scsi layer's error handling code
and it uses SUCCESS and FAILED for return values.
prev parent reply other threads:[~2010-07-05 18:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 0:00 [PATCH 07/12] be2iscsi: Fix for premature buffer free Jayamohan Kallickal
2010-07-04 20:00 ` Mike Christie
2010-07-04 20:22 ` Rolf Eike Beer
2010-07-05 18:58 ` Mike Christie [this message]
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=4C322B61.3030802@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Bottomley@suse.de \
--cc=eike-kernel@sf-tec.de \
--cc=jayamohank@serverengines.com \
--cc=linux-scsi@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.