OSDN Git Service

cxgb4/cxgb4vf: Fix mac_hlist initialization and free
authorArjun Vynipadath <arjun@chelsio.com>
Tue, 20 Nov 2018 06:41:39 +0000 (12:11 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Nov 2018 18:29:36 +0000 (10:29 -0800)
commitb539ea60f5043b9acd7562f04fa2117f18776cbb
tree2026ef28250849c40339e2dc647c6adbfdc39491
parentade9628ed049242fac5dd94730881f8c5e244634
cxgb4/cxgb4vf: Fix mac_hlist initialization and free

Null pointer dereference seen when cxgb4vf driver is unloaded
without bringing up any interfaces, moving mac_hlist initialization
to driver probe and free the mac_hlist in remove to fix the issue.

Fixes: 24357e06ba51 ("cxgb4vf: fix memleak in mac_hlist initialization")
Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c