Re: [PATCH net] net/mlx5e: fix csum adjustments caused by RXFCS
From: Eric Dumazet <edumazet@google.com>
Date: 2018-10-31 03:58:21
From: Eric Dumazet <edumazet@google.com>
Date: 2018-10-31 03:58:21
On Tue, Oct 30, 2018 at 11:59 AM Cong Wang [off-list ref] wrote:
I wonder how compiler recognizes it as "never fail" when marked with __must_check.
__must_check means that you can not ignore the return value of a function. Here we do use the return value. Also prior code was not checking skb->length so really my patch does add explicit check if in the future skb->len gets wrong after a bug is added in this driver. (A NULL deref will trap the bug, instead of potentially reading garbage from skb->data)