lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 06 Jan 2023 21:24:22 +0100
From:   clement.leger@...tlin.com
To:     Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc:     UNGLinuxDriver@...rochip.com,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Richard Cochran <richardcochran@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: lan966x: check for ptp to be enabled in
 lan966x_ptp_deinit()

Le 2023-01-06 21:21, Horatiu Vultur a écrit :
> The 01/06/2023 14:48, Clément Léger wrote:
> 
> Hi Clement,
> 
>> 
>> If ptp was not enabled due to missing IRQ for instance,
>> lan966x_ptp_deinit() will dereference NULL pointers.
>> 
>> Fixes: d096459494a8 ("net: lan966x: Add support for ptp clocks")
>> Signed-off-by: Clément Léger <clement.leger@...tlin.com>
> 
> You forgot to mark the patch to target the net tree.  But other
> than that looks good.

Hi Horatiu,

I'll resent a V2 to the net tree then. Thanks for reviewing.

Clément

> 
> Reviewed-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
> 
>> ---
>>  drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c | 3 +++
>>  1 file changed, 3 insertions(+)
>> 
>> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c 
>> b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
>> index f9ebfaafbebc..a8348437dd87 100644
>> --- a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
>> +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
>> @@ -1073,6 +1073,9 @@ void lan966x_ptp_deinit(struct lan966x *lan966x)
>>         struct lan966x_port *port;
>>         int i;
>> 
>> +       if (!lan966x->ptp)
>> +               return;
>> +
>>         for (i = 0; i < lan966x->num_phys_ports; i++) {
>>                 port = lan966x->ports[i];
>>                 if (!port)
>> --
>> 2.38.1
>> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ