lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170621150028.GH1248@mtr-leonro.local>
Date:   Wed, 21 Jun 2017 18:00:28 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Steve Wise <swise@...ngridcomputing.com>
Cc:     'Doug Ledford' <dledford@...hat.com>, linux-rdma@...r.kernel.org,
        'Chien Tin Tung' <chien.tin.tung@...el.com>,
        'Stephen Hemminger' <stephen@...workplumber.org>,
        'Jiri Pirko' <jiri@...lanox.com>,
        'Ariel Almog' <ariela@...lanox.com>,
        'Linux Netdev' <netdev@...r.kernel.org>
Subject: Re: [PATCH rdma-next 08/19] RDMA/core: Expose translation from
 device name to ib_device

On Wed, Jun 21, 2017 at 09:09:27AM -0500, Steve Wise wrote:
> > From: Leon Romanovsky <leonro@...lanox.com>
> >
> > Provide ability to convert from device name to ib_device for the
> > IB/core users.
> >
> > Signed-off-by: Leon Romanovsky <leonro@...lanox.com>
> > ---
> >  drivers/infiniband/core/core_priv.h | 1 +
> >  drivers/infiniband/core/device.c    | 3 +--
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/infiniband/core/core_priv.h
> > b/drivers/infiniband/core/core_priv.h
> > index 4a150c4be175..049ccbfca988 100644
> > --- a/drivers/infiniband/core/core_priv.h
> > +++ b/drivers/infiniband/core/core_priv.h
> > @@ -184,4 +184,5 @@ int ib_nl_handle_set_timeout(struct sk_buff *skb,
> >  int ib_nl_handle_ip_res_resp(struct sk_buff *skb,
> >  			     struct netlink_callback *cb);
> >
> > +struct ib_device *__ib_device_get_by_name(const char *name);
> >  #endif /* _CORE_PRIV_H */
> > diff --git a/drivers/infiniband/core/device.c
> b/drivers/infiniband/core/device.c
> > index 7a799fc90348..4ec1b24258de 100644
> > --- a/drivers/infiniband/core/device.c
> > +++ b/drivers/infiniband/core/device.c
> > @@ -124,7 +124,7 @@ static int ib_device_check_mandatory(struct ib_device
> > *device)
> >  	return 0;
> >  }
> >
> > -static struct ib_device *__ib_device_get_by_name(const char *name)
> > +struct ib_device *__ib_device_get_by_name(const char *name)
> >  {
> >  	struct ib_device *device;
> >
> >
>
> Nit: Why is this function prefixed with __?   Perhaps now it should just be
> ib_device_get_by_name()?

The access to this function should be protected by device_mutex and
the convention is to prefix functions with "_" to mark that it needs
to handle lock.

>
>
> Reviewed-by: Steve Wise <swise@...ngridcomputing.com>
>
>

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ