public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	Johannes Thumshirn <jthumshirn@suse.de>
Subject: Re: [PATCH v2] block: fix possible NULL dereference
Date: Fri, 1 Apr 2016 16:18:28 +0100	[thread overview]
Message-ID: <20160401151828.GA20149@sudip-tp> (raw)
In-Reply-To: <56FE87DF.3000603@kernel.dk>

On Fri, Apr 01, 2016 at 08:38:23AM -0600, Jens Axboe wrote:
> On 04/01/2016 08:34 AM, Sudip Mukherjee wrote:
> >We were checking for iter to be NULL after dereferencing it. There is
> >actually no need to check for iter to be NULL as all the callers of
> >blk_rq_map_user_iov() does call it with a valid pointer to
> >struct iov_iter.
> >But as iter->count can be NULL so the assignment to copy is being done
> >after checking for it.
> >
> >Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> >---
> >
> >v2: removed the check for iter
> >v1: moved the assignment to copy after check for iter and iter->count
> 
> Your subject is wrong (there's no NULL deref). Ditto for the commit message
> - it can be zero, not NULL. The latter would imply a memory address, but
> it's just an integer.

oops. I should have checked. I wanted to keep the commit message similar to
v1. I will send a v3 for this.

regards
sudip

      reply	other threads:[~2016-04-01 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 14:34 [PATCH v2] block: fix possible NULL dereference Sudip Mukherjee
2016-04-01 14:38 ` Jens Axboe
2016-04-01 15:18   ` Sudip Mukherjee [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=20160401151828.GA20149@sudip-tp \
    --to=sudipm.mukherjee@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=jthumshirn@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox