All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: James Bottomley <James.Bottomley@hansenpartnership.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	open-osd mailing-list <osd-dev@open-osd.org>
Cc: Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH 1/4] libosd: potential ERR_PTR dereference in osd_initiator.c
Date: Sun, 19 Apr 2009 19:19:19 +0300	[thread overview]
Message-ID: <49EB4F07.4030706@panasas.com> (raw)
In-Reply-To: <49EB4C53.2000902@panasas.com>


Sorry I forgot to put:

From: Dan Carpenter <error27@gmail.com>
On 04/19/2009 07:07 PM, Boaz Harrosh wrote:
> bio_map_kern() returns an ERR_PTR() not NULL.
> 
> Found by smatch (http://repo.or.cz/w/smatch.git).  Compile tested.
> 
> regards,
> dan carpenter
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
> ---
>  drivers/scsi/osd/osd_initiator.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
> index 2a5f077..76de889 100644
> --- a/drivers/scsi/osd/osd_initiator.c
> +++ b/drivers/scsi/osd/osd_initiator.c
> @@ -612,9 +612,9 @@ static int _osd_req_list_objects(struct osd_request *or,
>  
>  	WARN_ON(or->in.bio);
>  	bio = bio_map_kern(q, list, len, or->alloc_flags);
> -	if (!bio) {
> +	if (IS_ERR(bio)) {
>  		OSD_ERR("!!! Failed to allocate list_objects BIO\n");
> -		return -ENOMEM;
> +		return PTR_ERR(bio);
>  	}
>  
>  	bio->bi_rw &= ~(1 << BIO_RW);


  reply	other threads:[~2009-04-19 16:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-19 15:58 [PATCH 0/4] libosd: Last updates for Linux 2.6.30-rc Boaz Harrosh
2009-04-19 16:07 ` [PATCH 1/4] libosd: potential ERR_PTR dereference in osd_initiator.c Boaz Harrosh
2009-04-19 16:19   ` Boaz Harrosh [this message]
2009-04-19 16:11 ` [PATCH 2/4] libosd: OSD2r05: Prepare for rev5 attribute list changes Boaz Harrosh
2009-04-19 16:13 ` [PATCH 3/4] libosd: OSD2r05: OSD_CRYPTO_KEYID_SIZE will grow 20 => 32 bytes Boaz Harrosh
2009-04-19 16:17 ` [PATCH 4/4] libosd: OSD2r05: on-the-wire changes for latest OSD2 revision 5 Boaz Harrosh

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=49EB4F07.4030706@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=error27@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=osd-dev@open-osd.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.