On Tue, 24 Mar 2020 at 12:57, Yuval Shaia wrote:
> So what i can do is to check list->list at every API since destroy
> functions sets it to NULL.
No, that won't help. You can't check list->list for NULL without
taking the lock (because in the append etc functions you really
could be multithreade
On Tue, 24 Mar 2020 at 13:55, Peter Maydell
wrote:
> On Tue, 24 Mar 2020 at 11:25, Yuval Shaia
> wrote:
> > As i already said, current code makes sure it will not happen
> > however it better that API will ensure this and will not trust callers.
>
> I agree with the principle, but I think that h
On Tue, 24 Mar 2020 at 13:25, Peter Maydell
wrote:
> On Tue, 24 Mar 2020 at 11:18, Marcel Apfelbaum
> wrote:
> >
> > Hi Peter,Yuval
> >
> > On 3/24/20 1:05 PM, Peter Maydell wrote:
> > > So I think we require that the user of a protected-qlist
> > > ensures that there are no more users of it bef
On Tue, 24 Mar 2020 at 11:25, Yuval Shaia wrote:
> As i already said, current code makes sure it will not happen
> however it better that API will ensure this and will not trust callers.
I agree with the principle, but I think that here there is no
way to do it -- if you are literally destroying
On Tue, 24 Mar 2020 at 13:18, Marcel Apfelbaum
wrote:
> Hi Peter,Yuval
>
> On 3/24/20 1:05 PM, Peter Maydell wrote:
> > On Tue, 24 Mar 2020 at 10:54, Yuval Shaia
> wrote:
> >> To protect from the case that users of the protected_qlist are still
> >> using the qlist let's lock before detsroying i
On Tue, 24 Mar 2020 at 11:18, Marcel Apfelbaum
wrote:
>
> Hi Peter,Yuval
>
> On 3/24/20 1:05 PM, Peter Maydell wrote:
> > So I think we require that the user of a protected-qlist
> > ensures that there are no more users of it before it is
> > destroyed (which is fairly normal semantics), and the c
Hi Peter,Yuval
On 3/24/20 1:05 PM, Peter Maydell wrote:
On Tue, 24 Mar 2020 at 10:54, Yuval Shaia wrote:
To protect from the case that users of the protected_qlist are still
using the qlist let's lock before detsroying it.
Reported-by: Coverity (CID 1421951)
Signed-off-by: Yuval Shaia
---
On Tue, 24 Mar 2020 at 10:54, Yuval Shaia wrote:
>
> To protect from the case that users of the protected_qlist are still
> using the qlist let's lock before detsroying it.
>
> Reported-by: Coverity (CID 1421951)
> Signed-off-by: Yuval Shaia
> ---
> hw/rdma/rdma_utils.c | 1 +
> 1 file changed,
To protect from the case that users of the protected_qlist are still
using the qlist let's lock before detsroying it.
Reported-by: Coverity (CID 1421951)
Signed-off-by: Yuval Shaia
---
hw/rdma/rdma_utils.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/rdma/rdma_utils.c b/hw/rdma/rdma_ut