Re: [PATCH] perf/core: potential NULL deref if perf_event_alloc() fails

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

 



Dan Carpenter <dan.carpenter@xxxxxxxxxx> writes:

> I found this bug by looking for places where we do ERR_PTR(0).  The
> callers for perf_event_alloc() don't expect NULL returns and will oops.
> At first it looked like perf_init_event() can return NULL, but that's
> actually dead code.  I removed it.  But if the kcalloc() fails then we
> do need to set err = -ENOMEM.

I'd say this needs to be (at least) two patches, both with much better
commit messages.

Regards,
--
Alex
--
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