Re: [PATCH cgroup/for-4.5-fixes] cgroup: fix alloc_cgroup_ns() error handling in copy_cgroup_ns()

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

 



On Thu, Feb 18, 2016 at 11:21:12PM +0300, Dan Carpenter wrote:
> Sorry, I was feeling like a jerk yesterday.
> 
> I obviously could have fixed this myself but I wanted to make a point
> about one error label, do-everything style "future proof" error
> handling.  It is a trap for the unwary.
> 
> Now the code calls kfree(-ENOMEM).  It's a very predictable mistake.

lol let's take the chance and convert the NULL check in kfree() to
IS_ERR_OR_NULL().

Seriously tho, I don't think this is a good evidence against merged
error handling.  It's not like we don't make repeated mistakes with
split error labels.  Anyways, care to submit a proper patch?

Thanks.

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux