diff options
author | Foster Snowhill <forst@pen.gy> | 2025-01-26 00:54:06 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-01-28 12:16:32 +0100 |
commit | 2a9a196429e98fcc64078366c2679bc40aba5466 (patch) | |
tree | 3dd4120166fecc8d733f92e99fb0e54945ec8aaf /drivers/acpi/sbshc.h | |
parent | 86586dcb75cb8fd062a518aca8ee667938b91efb (diff) |
usbnet: ipheth: refactor NCM datagram loop
Introduce an rx_error label to reduce repetitions in the header
signature checks.
Store wDatagramIndex and wDatagramLength after endianness conversion to
avoid repeated le16_to_cpu() calls.
Rewrite the loop to return on a null trailing DPE, which is required
by the CDC NCM spec. In case it is missing, fall through to rx_error.
This change does not fix any particular issue. Its purpose is to
simplify a subsequent commit that fixes a potential OoB read by limiting
the maximum amount of processed DPEs.
Cc: stable@vger.kernel.org # 6.5.x
Signed-off-by: Foster Snowhill <forst@pen.gy>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/acpi/sbshc.h')
0 files changed, 0 insertions, 0 deletions