Revert "can: af_can: fix NULL pointer dereference in can_rcv_filter"
This reverts commit3982652957
which is commit 0acc442309a0a1b01bcdaa135e56e6398a49439c upstream. It is fixing a commit that was reverted from the Android tree due to it breaking the ABI, so it is not needed here at all. Revert it now as it breaks the build. Fixes:3982652957
("can: af_can: fix NULL pointer dereference in can_rcv_filter") Change-Id: I049aff8719673d31da9429579162d0aa1025834e Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
4ae923b7c6
commit
6429852aef
@ -678,7 +678,7 @@ static int can_rcv(struct sk_buff *skb, struct net_device *dev,
|
||||
{
|
||||
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
|
||||
|
||||
if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || skb->len != CAN_MTU)) {
|
||||
if (unlikely(dev->type != ARPHRD_CAN || skb->len != CAN_MTU)) {
|
||||
pr_warn_once("PF_CAN: dropped non conform CAN skbuff: dev type %d, len %d\n",
|
||||
dev->type, skb->len);
|
||||
goto free_skb;
|
||||
@ -704,7 +704,7 @@ static int canfd_rcv(struct sk_buff *skb, struct net_device *dev,
|
||||
{
|
||||
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
|
||||
|
||||
if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || skb->len != CANFD_MTU)) {
|
||||
if (unlikely(dev->type != ARPHRD_CAN || skb->len != CANFD_MTU)) {
|
||||
pr_warn_once("PF_CAN: dropped non conform CAN FD skbuff: dev type %d, len %d\n",
|
||||
dev->type, skb->len);
|
||||
goto free_skb;
|
||||
|
Loading…
Reference in New Issue
Block a user