Linux Kernel Mentees Archive on lore.kernel.org
 help / color / Atom feed
From: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: mike.marciniszyn@intel.com,
	"Paul E. McKenney" <paulmck@kernel.org>,
	linux-rdma@vger.kernel.org, dennis.dalessandro@intel.com,
	linux-kernel@vger.kernel.org, rcu@vger.kernel.org,
	dledford@redhat.com, Joel Fernandes <joel@joelfernandes.org>,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [Linux-kernel-mentees] [PATCH 1/3] infiniband: hw: hfi1: verbs.c: Use built-in RCU list checking
Date: Wed, 8 Jan 2020 00:05:31 +0530
Message-ID: <CAF65HP3JNE-pZRdHpzCA442yorgfSd3Aqkk4ux+9xPTx81+aPg@mail.gmail.com> (raw)
In-Reply-To: <20200107182640.GC26174@ziepe.ca>

[-- Attachment #1.1: Type: text/plain, Size: 1433 bytes --]

On Tue, Jan 7, 2020 at 11:56 PM Jason Gunthorpe <jgg@ziepe.ca> wrote:

> On Tue, Jan 07, 2020 at 11:05:08PM +0530, madhuparnabhowmik04@gmail.com
> wrote:
> > From: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
> >
> > list_for_each_entry_rcu has built-in RCU and lock checking.
> > Pass cond argument to list_for_each_entry_rcu.
> >
> > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
> >  drivers/infiniband/hw/hfi1/verbs.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/hw/hfi1/verbs.c
> b/drivers/infiniband/hw/hfi1/verbs.c
> > index 089e201d7550..cab2ff185240 100644
> > +++ b/drivers/infiniband/hw/hfi1/verbs.c
> > @@ -515,7 +515,8 @@ static inline void hfi1_handle_packet(struct
> hfi1_packet *packet,
> >                                      opa_get_lid(packet->dlid, 9B));
> >               if (!mcast)
> >                       goto drop;
> > -             list_for_each_entry_rcu(p, &mcast->qp_list, list) {
> > +             list_for_each_entry_rcu(p, &mcast->qp_list, list
> > +
>  lock_is_held(&(ibp->rvp.lock).dep_map)) {
>
> This is missing a ',' and isn't indented properly. Does it even
> compile?
>
> I am really sorry about this, I will resend this patch.
Yes, it compiles, though I guess after testing I edited it by mistake.

Thanks,
Madhuparna


> The idea seems sound though.
>
> Jason
>
[-- Attachment #1.2: Type: text/html, Size: 2728 bytes --]

<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 7, 2020 at 11:56 PM Jason Gunthorpe &lt;<a href="mailto:jgg@ziepe.ca">jgg@ziepe.ca</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Jan 07, 2020 at 11:05:08PM +0530, <a href="mailto:madhuparnabhowmik04@gmail.com" target="_blank">madhuparnabhowmik04@gmail.com</a> wrote:<br>
&gt; From: Madhuparna Bhowmik &lt;<a href="mailto:madhuparnabhowmik04@gmail.com" target="_blank">madhuparnabhowmik04@gmail.com</a>&gt;<br>
&gt; <br>
&gt; list_for_each_entry_rcu has built-in RCU and lock checking.<br>
&gt; Pass cond argument to list_for_each_entry_rcu.<br>
&gt; <br>
&gt; Signed-off-by: Madhuparna Bhowmik &lt;<a href="mailto:madhuparnabhowmik04@gmail.com" target="_blank">madhuparnabhowmik04@gmail.com</a>&gt;<br>
&gt;  drivers/infiniband/hw/hfi1/verbs.c | 3 ++-<br>
&gt;  1 file changed, 2 insertions(+), 1 deletion(-)<br>
&gt; <br>
&gt; diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c<br>
&gt; index 089e201d7550..cab2ff185240 100644<br>
&gt; +++ b/drivers/infiniband/hw/hfi1/verbs.c<br>
&gt; @@ -515,7 +515,8 @@ static inline void hfi1_handle_packet(struct hfi1_packet *packet,<br>
&gt;                                      opa_get_lid(packet-&gt;dlid, 9B));<br>
&gt;               if (!mcast)<br>
&gt;                       goto drop;<br>
&gt; -             list_for_each_entry_rcu(p, &amp;mcast-&gt;qp_list, list) {<br>
&gt; +             list_for_each_entry_rcu(p, &amp;mcast-&gt;qp_list, list<br>
&gt; +                                                             lock_is_held(&amp;(ibp-&gt;rvp.lock).dep_map)) {<br>
<br>
This is missing a &#39;,&#39; and isn&#39;t indented properly. Does it even<br>
compile?<br>
<br></blockquote><div>I am really sorry about this, I will resend this patch.</div><div>Yes, it compiles, though I guess after testing I edited it by mistake.</div><div><br></div><div>Thanks,</div><div>Madhuparna</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The idea seems sound though.<br>
<br>
Jason<br>
</blockquote></div></div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=abWFkaHVwYXJuYWJob3dtaWswNEBnbWFpbC5jb20%3D&amp;type=zerocontent&amp;guid=1d0a4aad-2a9e-4301-b60e-98b484865aa5"><font color="#ffffff" size="1">ᐧ</font></div>

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  reply index

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 17:35 madhuparnabhowmik04
2020-01-07 17:35 ` [Linux-kernel-mentees] [PATCH 2/3] infiniband: hw: qib: qib_verbs: " madhuparnabhowmik04
2020-01-07 17:35 ` [Linux-kernel-mentees] [PATCH 3/3] infiniband: sw: rdmavt: mcast.c: " madhuparnabhowmik04
2020-01-07 18:26 ` [Linux-kernel-mentees] [PATCH 1/3] infiniband: hw: hfi1: verbs.c: " Jason Gunthorpe
2020-01-07 18:35   ` Madhuparna Bhowmik [this message]
2020-01-07 19:29 madhuparnabhowmik04
2020-01-07 20:33 ` Jason Gunthorpe
2020-01-08  8:05   ` madhuparnabhowmik04
2020-01-08  8:08   ` madhuparnabhowmik04
2020-01-09 18:10   ` Jason Gunthorpe
2020-01-10 15:54   ` Joel Fernandes
2020-01-14 16:23 madhuparnabhowmik04
2020-01-14 16:57 ` Jason Gunthorpe
2020-01-14 17:00   ` Dennis Dalessandro
2020-01-14 18:24     ` Dennis Dalessandro
2020-01-14 18:34       ` madhuparnabhowmik04
2020-01-14 19:17       ` Joel Fernandes
2020-01-14 19:41       ` Jason Gunthorpe
2020-01-14 19:46         ` Dennis Dalessandro
2020-02-14 15:43       ` Madhuparna Bhowmik
2020-02-14 17:24         ` Dennis Dalessandro
2020-02-14 17:32           ` Madhuparna Bhowmik

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF65HP3JNE-pZRdHpzCA442yorgfSd3Aqkk4ux+9xPTx81+aPg@mail.gmail.com \
    --to=madhuparnabhowmik04@gmail.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mike.marciniszyn@intel.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux Kernel Mentees Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-kernel-mentees/0 linux-kernel-mentees/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kernel-mentees linux-kernel-mentees/ https://lore.kernel.org/linux-kernel-mentees \
		linux-kernel-mentees@lists.linuxfoundation.org
	public-inbox-index linux-kernel-mentees

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxfoundation.lists.linux-kernel-mentees


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git