Skip to content
Commit 07b0f009 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

bnx2x: fix possible panic under memory stress



While it is legal to kfree(NULL), it is not wise to use :
put_page(virt_to_head_page(NULL))

 BUG: unable to handle kernel paging request at ffffeba400000000
 IP: [<ffffffffc01f5928>] virt_to_head_page+0x36/0x44 [bnx2x]

Reported-by: default avatarMichel Lespinasse <walken@google.com>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Ariel Elior <ariel.elior@qlogic.com>
Fixes: d46d132c

 ("bnx2x: use netdev_alloc_frag()")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7f502361
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment