]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2x: fix possible panic under memory stress
authorEric Dumazet <edumazet@google.com>
Thu, 26 Jun 2014 07:44:02 +0000 (00:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Jul 2014 19:20:20 +0000 (12:20 -0700)
commit2dbef7a5a742505cd976e5993c1ae5baff0f74c1
treebf5c690b804626166c77aa24ce8ea7dbff29583a
parent491588e0e054fcb7bd79285bdadc0da52d59faf1
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: Michel Lespinasse <walken@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ariel Elior <ariel.elior@qlogic.com>
Fixes: 82141d848cc4 ("bnx2x: use netdev_alloc_frag()")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c