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  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]
Date:   Fri, 22 Mar 2019 17:55:11 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Ilya Dryomov <idryomov@...il.com>
Cc:     Sage Weil <sage@...hat.com>, Alex Elder <elder@...nel.org>,
        Jens Axboe <axboe@...nel.dk>,
        clang-built-linux@...glegroups.com,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nathan Chancellor <natechancellor@...il.com>,
        Jason Dillaman <dillaman@...hat.com>,
        Ceph Development <ceph-devel@...r.kernel.org>,
        linux-block <linux-block@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rbd: avoid clang -Wuninitialized warning

On Fri, Mar 22, 2019 at 5:33 PM Ilya Dryomov <idryomov@...il.com> wrote:
>
> On Fri, Mar 22, 2019 at 3:36 PM Arnd Bergmann <arnd@...db.de> wrote:
> >
> > diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> > index 4ba967d65cf9..cbcc3baf3807 100644
> > --- a/drivers/block/rbd.c
> > +++ b/drivers/block/rbd.c
> > @@ -2399,7 +2399,7 @@ static int rbd_obj_read_from_parent(struct rbd_obj_request *obj_req)
> >                                                       &obj_req->bvec_pos);
> >                         break;
> >                 default:
> > -                       rbd_assert(0);
> > +                       BUG();
> >                 }
> >         } else {
> >                 ret = rbd_img_fill_from_bvecs(child_img_req,
>
> Hi Arnd,
>
> You did a couple of these last year in commit c6244b3b2377 ("rbd: avoid
> Wreturn-type warnings").

Ah, I had completely forgotten about that. Different bug and different
compiler, but same solution ;-)

>  Let's change all of those default cases to BUG
> in one go.  Do you want to do that or should I?

I've prepared another patch now and sent it out, please
apply it on top. I'd like this one-line patch to stay separate though
since it captures the warning message and may need to
be backported to stable kernels later.

      Arnd

Powered by blists - more mailing lists