Re: [PATCH] qed: Fix potential use-after-free in qed_spq_post()

2018-01-16 Thread David Miller
From: Roland Dreier Date: Mon, 15 Jan 2018 12:24:49 -0800 > From: Roland Dreier > > We need to check if p_ent->comp_mode is QED_SPQ_MODE_EBLOCK before > calling qed_spq_add_entry(). The test is fine is the mode is EBLOCK, > but if it isn't then qed_spq_add_entry() might kfree(p_ent). > > Sign

[PATCH] qed: Fix potential use-after-free in qed_spq_post()

2018-01-15 Thread Roland Dreier
From: Roland Dreier We need to check if p_ent->comp_mode is QED_SPQ_MODE_EBLOCK before calling qed_spq_add_entry(). The test is fine is the mode is EBLOCK, but if it isn't then qed_spq_add_entry() might kfree(p_ent). Signed-off-by: Roland Dreier --- drivers/net/ethernet/qlogic/qed/qed_spq.c |