[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111019163528.GC25124@google.com>
Date: Wed, 19 Oct 2011 09:35:28 -0700
From: Tejun Heo <tj@...nel.org>
To: Vivek Goyal <vgoyal@...hat.com>
Cc: axboe@...nel.dk, linux-kernel@...r.kernel.org, ctalbott@...gle.com,
rni@...gle.com
Subject: Re: [PATCH 05/10] block: drop unnecessary blk_get/put_queue() in
scsi_cmd_ioctl() and blk_get_tg()
Hey, Vivek.
On Wed, Oct 19, 2011 at 09:52:54AM -0400, Vivek Goyal wrote:
> What makes sure that caller has the reference to the queue upon entry. If
> that's the case, that's good. Just that I had not figured it out so
> resorted to defensive programming as taking extra reference does not harm.
The fact that @q can be dereferenced on entry at all. :)
Taking extra reference doesn't help anything. If the caller doesn't
have standing reference, it will just change where oops occurs. W/o
extra ref, it will crash soon after the last reference is put. W/
extra ref, it will crash after the extra ref is put. If the caller
doesn't hold a reference, there's nothing the callee can do to fix
that.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists