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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a9f67a55-3471-46b3-bd02-757b0796658a@amperemail.onmicrosoft.com>
Date: Mon, 28 Apr 2025 14:48:53 -0400
From: Adam Young <admiyo@...eremail.onmicrosoft.com>
To: "lihuisong (C)" <lihuisong@...wei.com>, admiyo@...amperecomputing.com,
 Jeremy Kerr <jk@...econstruct.com.au>,
 Matt Johnston <matt@...econstruct.com.au>,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 Sudeep Holla <sudeep.holla@....com>,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH net-next v20 1/1] mctp pcc: Implement MCTP over PCC
 Transport


On 4/24/25 09:03, lihuisong (C) wrote:
>> +    rc = mctp_pcc_initialize_mailbox(dev, &mctp_pcc_ndev->inbox,
>> +                     context.inbox_index);
>> +    if (rc)
>> +        goto free_netdev;
>> +    mctp_pcc_ndev->inbox.client.rx_callback = 
>> mctp_pcc_client_rx_callback;
> It is good to move the assignemnt of  rx_callback pointer to 
> initialize inbox mailbox.


The other changes are fine, but this one I do not agree with.

The rx callback only makes sense for one of the two mailboxes, and thus 
is not appropriate for a generic function.

Either  initialize_mailbox needs more complex logic, or would blindly 
assign the callback to both mailboxes, neither of which simplifies or 
streamlines the code.  That function emerged as a way to reduce 
duplication.  Lets keep it that way.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ