Re: [PATCH] skd: error pointer dereference in skd_cons_disk()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/23/2017 05:20 AM, Dan Carpenter wrote:
> My initial impulse was to check for IS_ERR_OR_NULL() but when I looked
> at this code a bit more closely, we should only need to check for
> IS_ERR().
> 
> The blk_mq_alloc_tag_set() returns negative error codes and zero on
> success so we can just do an "if (rc) goto err_out;".  It's better to
> preserve the error code anyhow.  The blk_mq_init_queue() returns error
> pointers on failure, it never returns NULL.  We can also remove the
> "q = NULL;" at the start because that's no longer needed.

Applied, thanks Dan.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux