Thread (9 messages) flat view 9 messages, 2 authors, 2017-07-10

Re: [PATCH 1/2 net] ptp: fix error codes in ptp_clock_register()

From: Dan Carpenter <hidden>
Date: 2017-07-10 09:38:30
Also in: kernel-janitors

On Mon, Jul 10, 2017 at 11:21:03AM +0200, Richard Cochran wrote:
On Mon, Jul 10, 2017 at 10:11:37AM +0300, Dan Carpenter wrote:
quoted
The ptp_clock_register() function returns NULL when it's #ifdefed out
because CONFIG_PTP_1588_CLOCK is disabled.  Otherwise, it's intended to
return error pointers.  Unfortunately, there are a couple paths where we
forget to set the error code.  It means that we could result in NULL
pointer dereferences in the callers.

Fixes: d94ba80ebbea ("ptp: Added a brand new class driver for ptp clocks.")
This "Fixes" tag references the wrong commit.  Please correct it.
There were two buggy commits so I chose the ealier one.  The other buggy
commit is 85a66e550195 ("ptp: create "pins" together with the rest of
attributes").  I should have CC'd Dmitry as well.  I can resend.

regards,
dan carpenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help