On Fri, Jan 24, 2020 at 12:52:40AM -0500, Devesh Sharma wrote: > static void bnxt_re_destroy_chip_ctx(struct bnxt_re_dev *rdev) > { > + struct bnxt_qplib_chip_ctx *chip_ctx; > + > + if (!rdev->chip_ctx) > + return; > + chip_ctx = rdev->chip_ctx; > + rdev->chip_ctx = NULL; > rdev->rcfw.res = NULL; > rdev->qplib_res.cctx = NULL; > + kfree(chip_ctx); > } Are you sure this kfree is late enough? I couldn't deduce if it was really safe to NULL chip_ctx here. IMHO you should free it as part of the ib device dealloc. Jason