public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: "Marciniszyn,
	Mike" <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Dalessandro,
	Dennis"
	<dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Hefty,
	Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Hal Rosenstock
	<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] IB/hfi1: Using kfree_rcu() to simplify the code
Date: Tue, 9 Aug 2016 20:51:06 +0300	[thread overview]
Message-ID: <20160809175106.GB23921@leon.nu> (raw)
In-Reply-To: <32E1700B9017364D9B60AED9960492BC2D09F703-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2216 bytes --]

On Tue, Aug 09, 2016 at 04:20:08PM +0000, Marciniszyn, Mike wrote:
> 
> 
> > -----Original Message-----
> > From: Wei Yongjun [mailto:weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
> > Sent: Monday, August 8, 2016 5:50 AM
> > To: Marciniszyn, Mike <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; Dalessandro, Dennis
> > <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>;
> > Hefty, Sean <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; Hal Rosenstock
> > <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > Cc: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > Subject: [PATCH] IB/hfi1: Using kfree_rcu() to simplify the code
> > 
> > The callback function of call_rcu() just calls a kfree(), so we can use
> > kfree_rcu() instead of call_rcu() + callback function.
> > 
> > Signed-off-by: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> >  drivers/infiniband/hw/hfi1/mad.c | 9 +--------
> >  1 file changed, 1 insertion(+), 8 deletions(-)
> > 
> > diff --git a/drivers/infiniband/hw/hfi1/mad.c
> > b/drivers/infiniband/hw/hfi1/mad.c
> > index 1263abe..95c43e1 100644
> > --- a/drivers/infiniband/hw/hfi1/mad.c
> > +++ b/drivers/infiniband/hw/hfi1/mad.c
> > @@ -3398,7 +3398,7 @@ static void apply_cc_state(struct hfi1_pportdata
> > *ppd)
> > 
> >  	spin_unlock(&ppd->cc_state_lock);
> > 
> > -	call_rcu(&old_cc_state->rcu, cc_state_reclaim);
> > +	kfree_rcu(old_cc_state, rcu);
> >  }
> > 
> 
> This patch misses another call_rcu() that needs to be replaced in cleanup_device_data()
> and that seems to be causing 0day issues.
> 
> Doug, have you put this anywhere to elicit the 0day issues?

0day bot runs on patches in mailing list too.

> 
> Nacked-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-08-09 17:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08  9:50 [PATCH] IB/hfi1: Using kfree_rcu() to simplify the code Wei Yongjun
     [not found] ` <1470649818-30040-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-08 15:15   ` kbuild test robot
2016-08-08 21:41   ` kbuild test robot
2016-08-09 16:20   ` Marciniszyn, Mike
     [not found]     ` <32E1700B9017364D9B60AED9960492BC2D09F703-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-08-09 17:51       ` Leon Romanovsky [this message]
2016-08-10  3:14   ` [PATCH v2] " Wei Yongjun
     [not found]     ` <1470798844-30421-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-10 14:56       ` Marciniszyn, Mike
     [not found]         ` <32E1700B9017364D9B60AED9960492BC2D09FEB9-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-08-22 18:19           ` Doug Ledford
2016-08-10 17:07       ` Marciniszyn, Mike

Reply instructions:

You may reply publicly 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=20160809175106.GB23921@leon.nu \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox