Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-19 Thread Jason Gunthorpe
On Tue, May 19, 2020 at 04:30:52PM -0700, Divya Indi wrote: > Hi Jason, > > I wanted to follow up to see if you got a chance to review the following > reply? Not yet, it still seems bad to be doing code like this. If two threads are sharing memory they really need to use a refcount/kref not

Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-19 Thread Divya Indi
Hi Jason, I wanted to follow up to see if you got a chance to review the following reply? Let me know if it addresses your concern and if you have any questions! Thanks, Divya On 5/13/20 2:02 PM, Divya Indi wrote: > Hi Jason, > > Please find my comments inline - > > On 5/13/20 8:00 AM, Jason

Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-13 Thread Divya Indi
Hi Jason, Please find my comments inline - On 5/13/20 8:00 AM, Jason Gunthorpe wrote: > On Mon, May 11, 2020 at 02:26:30PM -0700, Divya Indi wrote: @@ -1123,6 +1156,18 @@ int ib_nl_handle_resolve_resp(struct sk_buff *skb, send_buf = query->mad_buf; + /* +

Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-13 Thread Jason Gunthorpe
On Mon, May 11, 2020 at 02:26:30PM -0700, Divya Indi wrote: > >> @@ -1123,6 +1156,18 @@ int ib_nl_handle_resolve_resp(struct sk_buff *skb, > >> > >>send_buf = query->mad_buf; > >> > >> + /* > >> + * Make sure the IB_SA_NL_QUERY_SENT flag is set before > >> + * processing this query.

RE: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-12 Thread Wan, Kaike
Nichanamatlu ; Doug Ledford > > Subject: Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg. > > Hi, > > Thanks for taking the time to review. Please find my comments inline - > > On 5/7/20 1:16 PM, Wan, Kaike wrote: > > > >> -Original Message

Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-11 Thread Divya Indi
Hi Hillf, Please find my comments inline - On 5/8/20 4:03 AM, Hillf Danton wrote: > On Thu, 7 May 2020 12:36:29 Mark Bloch wrote: >> On 5/7/2020 11:34, Divya Indi wrote: >>> This patch fixes commit - >>> commit 3ebd2fd0d011 ("IB/sa: Put netlink request into the request list >>> before

Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-11 Thread Divya Indi
Hi Jason, On 5/7/20 5:08 PM, Jason Gunthorpe wrote: > On Thu, May 07, 2020 at 11:34:47AM -0700, Divya Indi wrote: >> This patch fixes commit - >> commit 3ebd2fd0d011 ("IB/sa: Put netlink request into the request list >> before sending")' >> >> Above commit adds the query to the request list

Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-11 Thread Divya Indi
ndi ; linux-kernel@vger.kernel.org; linux- >>> r...@vger.kernel.org; Jason Gunthorpe ; Wan, Kaike >>> >>> Cc: Gerd Rausch ; Håkon Bugge >>> ; Srinivas Eeda ; >>> Rama Nichanamatlu ; Doug Ledford >>> >>> Subject: Re: [PATCH 1/2] IB/sa: Resolving use

Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-11 Thread Divya Indi
;> r...@vger.kernel.org; Jason Gunthorpe ; Wan, Kaike >> >> Cc: Gerd Rausch ; Håkon Bugge >> ; Srinivas Eeda ; >> Rama Nichanamatlu ; Doug Ledford >> >> Subject: Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg. >> >>

Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-07 Thread Jason Gunthorpe
On Thu, May 07, 2020 at 11:34:47AM -0700, Divya Indi wrote: > This patch fixes commit - > commit 3ebd2fd0d011 ("IB/sa: Put netlink request into the request list before > sending")' > > Above commit adds the query to the request list before ib_nl_snd_msg. > > However, if there is a delay in

Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-07 Thread Mark Bloch
> Cc: Gerd Rausch ; Håkon Bugge >> ; Srinivas Eeda ; >> Rama Nichanamatlu ; Doug Ledford >> >> Subject: Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg. >> >> >>> @@ -1123,6 +1156,18 @@ int ib_nl_handle_resolve_resp(struct

RE: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-07 Thread Wan, Kaike
Nichanamatlu ; Doug Ledford > > Subject: Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg. > > > > @@ -1123,6 +1156,18 @@ int ib_nl_handle_resolve_resp(struct sk_buff > > *skb, > > > > send_buf = query->mad_buf; > > > > + /* > &g

Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-07 Thread Mark Bloch
On 5/7/2020 11:34, Divya Indi wrote: > This patch fixes commit - > commit 3ebd2fd0d011 ("IB/sa: Put netlink request into the request list before > sending")' > > Above commit adds the query to the request list before ib_nl_snd_msg. > > However, if there is a delay in sending out the request

RE: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-07 Thread Wan, Kaike
> This patch fixes commit - > commit 3ebd2fd0d011 ("IB/sa: Put netlink request into the request list > before sending")' > > Above commit adds the query to the request list before ib_nl_snd_msg. > > However, if there is a delay in sending out the request (For > eg: Delay due to low memory

[PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

2020-05-07 Thread Divya Indi
This patch fixes commit - commit 3ebd2fd0d011 ("IB/sa: Put netlink request into the request list before sending")' Above commit adds the query to the request list before ib_nl_snd_msg. However, if there is a delay in sending out the request (For eg: Delay due to low memory situation) the timer