From mboxrd@z Thu Jan 1 00:00:00 1970 From: sagi@grimberg.me (Sagi Grimberg) Date: Wed, 21 Nov 2018 18:57:48 -0800 Subject: [PATCH] drivers/nvme/host/rdma.c: Fix double freeing of async event data In-Reply-To: References: <1542744673-28129-1-git-send-email-psajeepa@purestorage.com> <47965bbe-ef63-eb54-60e3-b2662ae82e8f@grimberg.me> Message-ID: <71ba474f-527f-fb67-5b7e-9b0ffc17a01c@grimberg.me> > wrote: >> Yes, we need to set qe->data to NULL in alloc_qe failure path as well. >> I was suggesting setting of qe->data to NULL in nvme_rdma_free_qe() in addition to the fix suggested by you. > > I'm ambivalent, I think either way of handling clearing data after > free_qe is fine. Two out of the three calls to free_qe need the "set > to NULL", so I personally don't have a strong feeling about whether > open-coding the data=NULL or putting it in the free function is > better. How about simply NULLing for the specific flow that Roland spotted in addition to yours?