]> git.baikalelectronics.ru Git - kernel.git/commit
allocate_flower_entry: should check for null deref
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Sun, 21 Jul 2019 06:37:31 +0000 (01:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Jul 2019 18:47:30 +0000 (11:47 -0700)
commit2b3e5ecd1073e9c957be6a4158a33ab76f5ec981
treece284a36b9f25ceb45f34f2fe51116e2d98d773e
parent883dd678d05cfa6b8422b38aabbfb11df49abf4f
allocate_flower_entry: should check for null deref

allocate_flower_entry does not check for allocation success, but tries
to deref the result. I only moved the spin_lock under null check, because
 the caller is checking allocation's status at line 652.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c