lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54A6D7F9.3090203@fb.com>
Date:	Fri, 2 Jan 2015 10:40:09 -0700
From:	Jens Axboe <axboe@...com>
To:	Al Viro <viro@...IV.linux.org.uk>
CC:	Ming Lei <ming.lei@...onical.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] block: fix checking return value of blk_mq_init_queue

On 01/02/2015 10:34 AM, Al Viro wrote:
> On Fri, Jan 02, 2015 at 08:53:11AM -0700, Jens Axboe wrote:
>> On 01/02/2015 07:25 AM, Ming Lei wrote:
>>> Check IS_ERR_OR_NULL(return value) instead of just return value.
>>
>> Thanks Ming, applied.
>
> Umm...  Looking at the callers, I'd suggest making it _never_ return NULL -
> it's always treates as ERR_PTR(-ENOMEM) anyway.  Then the checks would be
> just IS_ERR(...).
>
> IS_ERR_OR_NULL() is very often a sign of lousy calling conventions and
> this case is no exception...

I actually made that change when committing it:

http://git.kernel.dk/?p=linux-block.git;a=commit;h=35b489d32fcc37e8735f41aa794b24cf9d1e74f5


-- 
Jens Axboe

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ