Re: [PATCH AUTOSEL 4.9 11/16] net: korina: Fix return type of korina_send_packet

From: Pavel Machek
Date: Mon Oct 17 2022 - 06:25:17 EST


Hi!

> From: Nathan Huckleberry <nhuck@xxxxxxxxxx>
>
> [ Upstream commit 106c67ce46f3c82dd276e983668a91d6ed631173 ]
>
> The ndo_start_xmit field in net_device_ops is expected to be of type
> netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev).
>
> The mismatched return type breaks forward edge kCFI since the underlying
> function definition does not match the function hook definition.
>
> The return type of korina_send_packet should be changed from int to
> netdev_tx_t.

Patches 4-6, 9-11: I see this is nice cleanup for mainline, but ... do
we have CFI in 4.9 tree? This mismatch does not and can not cause any
problems there, right?

Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Attachment: signature.asc
Description: PGP signature