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

Re: [dm-devel] [PATCH 3/4] block: fix a probe argument to blk_register_region



On Mon, Oct 14, 2013 at 12:13:24PM -0400, Mikulas Patocka wrote:
> The probe function is supposed to return NULL on failure (as we can see in
> kobj_lookup: kobj = probe(dev, index, data); ... if (kobj) return kobj;
> 
> However, in loop and brd, it returns negative error from ERR_PTR.
> 
> This causes a crash if we simulate disk allocation failure and run
> less -f /dev/loop0 because the negative number is interpreted as a pointer:
...
> Signed-off-by: Mikulas Patocka <mpatocka redhat com>
> Cc: stable kernel org	# 2.6.22+

Acked-by: Tejun Heo <tj kernel org>

Thanks.

-- 
tejun


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