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] [day] [month] [year] [list]
Message-ID: <CAOi1vP98SM3Z7zr9vZS8C_4-mPHgbSNHiOwkKmfVKXu6xRf0+w@mail.gmail.com>
Date:   Mon, 11 Oct 2021 13:31:50 +0200
From:   Ilya Dryomov <idryomov@...il.com>
To:     Jεan Sacren <sakiwit@...il.com>
Cc:     Jeff Layton <jlayton@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Ceph Development <ceph-devel@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: ceph: fix ->monmap and err initialization

On Mon, Oct 11, 2021 at 8:45 AM Jεan Sacren <sakiwit@...il.com> wrote:
>
> From: Jean Sacren <sakiwit@...il.com>
>
> Call to build_initial_monmap() is one stone two birds.  Explicitly it
> initializes err variable. Implicitly it initializes ->monmap via call to
> kzalloc().  We should only declare err and ->monmap is taken care of by
> ceph_monc_init() prototype.
>
> Signed-off-by: Jean Sacren <sakiwit@...il.com>
> ---
>  net/ceph/mon_client.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
> index 013cbdb6cfe2..6a6898ee4049 100644
> --- a/net/ceph/mon_client.c
> +++ b/net/ceph/mon_client.c
> @@ -1153,12 +1153,11 @@ static int build_initial_monmap(struct ceph_mon_client *monc)
>
>  int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl)
>  {
> -       int err = 0;
> +       int err;
>
>         dout("init\n");
>         memset(monc, 0, sizeof(*monc));
>         monc->client = cl;
> -       monc->monmap = NULL;
>         mutex_init(&monc->mutex);
>
>         err = build_initial_monmap(monc);

Applied.

Thanks,

                Ilya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ