All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Bernard Metzler <BMT@zurich.ibm.com>
Cc: Guoqing Jiang <guoqing.jiang@linux.dev>,
	"leon@kernel.org" <leon@kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH 0/5] Fix potential issues for siw
Date: Thu, 27 Jul 2023 14:29:21 -0300	[thread overview]
Message-ID: <ZMKpcQsJ3FBvxYHo@ziepe.ca> (raw)
In-Reply-To: <SN7PR15MB575506FAF5423F726708AF8F9901A@SN7PR15MB5755.namprd15.prod.outlook.com>

On Thu, Jul 27, 2023 at 05:17:40PM +0000, Bernard Metzler wrote:
> 
> 
> > -----Original Message-----
> > From: Guoqing Jiang <guoqing.jiang@linux.dev>
> > Sent: Thursday, 27 July 2023 16:04
> > To: Bernard Metzler <BMT@zurich.ibm.com>; jgg@ziepe.ca; leon@kernel.org
> > Cc: linux-rdma@vger.kernel.org
> > Subject: [EXTERNAL] [PATCH 0/5] Fix potential issues for siw
> > 
> > Hi,
> > 
> > Several issues appeared if we rmmod siw module after failed to insert
> > the module (with manual change like below).
> > 
> > --- a/drivers/infiniband/sw/siw/siw_main.c
> > +++ b/drivers/infiniband/sw/siw/siw_main.c
> > @@ -577,6 +577,7 @@ static __init int siw_init_module(void)
> >         if (rv)
> >                 goto out_error;
> > 
> > +       goto out_error;
> >         rdma_link_register(&siw_link_ops);
> > 
> > Basically, these issues are double free, use before initalization or
> > null pointer dereference. For more details, pls review the individual
> > patch.
> > 
> > Thanks,
> > Guoqing
> 
> Hi Guoqing,
> 
> very good catch, thank you. I was under the wrong assumption a
> module is not loaded if the init_module() returns a value.

I think that is actually true, isn't it? I'm confused?

Jason

  reply	other threads:[~2023-07-27 17:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 14:03 [PATCH 0/5] Fix potential issues for siw Guoqing Jiang
2023-07-27 14:03 ` [PATCH 1/5] RDMA/siw: Set siw_cm_wq to NULL after it is destroyed Guoqing Jiang
2023-07-27 14:03 ` [PATCH 2/5] RDMA/siw: Ensure siw_destroy_cpulist can be called more than once Guoqing Jiang
2023-07-27 14:03 ` [PATCH 3/5] RDMA/siw: Initialize siw_link_ops.list Guoqing Jiang
2023-07-27 14:03 ` [PATCH 4/5] RDMA/siw: Set siw_crypto_shash to NULL after it is freed Guoqing Jiang
2023-07-27 14:03 ` [PATCH 5/5] RDMA/siw: Don't call wake_up unconditionally in siw_stop_tx_thread Guoqing Jiang
2023-07-27 17:17 ` [PATCH 0/5] Fix potential issues for siw Bernard Metzler
2023-07-27 17:29   ` Jason Gunthorpe [this message]
2023-07-27 18:15     ` Bart Van Assche
2023-07-28  1:16     ` Guoqing Jiang
2023-07-28  2:29       ` Guoqing Jiang
2023-07-28 11:10         ` Bernard Metzler
2023-07-28  9:36       ` Bernard Metzler
2023-08-09 19:04 ` Jason Gunthorpe
2023-08-10  1:14   ` Guoqing Jiang

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=ZMKpcQsJ3FBvxYHo@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=BMT@zurich.ibm.com \
    --cc=guoqing.jiang@linux.dev \
    --cc=leon@kernel.org \
    --cc=linux-rdma@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.