lkml.org 
[lkml]   [2014]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 0/2] block,scsi: fixup blk_get_request dead queue scenarios
On 08/27/2014 09:50 AM, Boaz Harrosh wrote:
> On 08/27/2014 05:07 PM, Jens Axboe wrote:
>> On 08/26/2014 04:01 PM, Jeff Moyer wrote:
>>> Jens Axboe <axboe@kernel.dk> writes:
> <>
>> There's also a bug in osd_initiator.c, _init_blk_request(). We jump to
>> 'out' for IS_ERR(req), which attempts to print or->request, which hasn't
>> been assigned yet.
>
> You mean this code:
> req = _make_request(q, has_out, has_out ? &or->out : &or->in, flags);
> if (IS_ERR(req)) {
> ret = PTR_ERR(req);
> goto out;
> }
>
> or->request = req;
>
> But _make_request used to already return -ENOMEM as a pointer in req
> So if this is a bug it was not introduced by this patch.

Joe brought this up too, I guess it's been there before this patch.

> And it is not a bug at all the print prints the pointer. The all of
> this code assumes osd_request was allocated ZERO set. the print of %p
> is fine with NULLs (and any number for that matter)

If or->request is NULL initialized, it's fine. I didn't track the path
to check if it was garbage or NULL.

> I have reviewed this patch for osd part, it is fine

Thanks!

--
Jens Axboe



\
 
 \ /
  Last update: 2014-08-27 18:21    [W:0.045 / U:2.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site