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: <CALFYKtB4MV61h22cfQnfyXNpN98=Y+Y7T8Ab+kxoE-MTwwZBPA@mail.gmail.com>
Date:	Sat, 25 Oct 2014 19:05:06 +0400
From:	Ilya Dryomov <ilya.dryomov@...tank.com>
To:	Fabian Frederick <fabf@...net.be>
Cc:	netdev@...r.kernel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Ceph Development <ceph-devel@...r.kernel.org>,
	Sage Weil <sage@...tank.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH 1/1 net-next] libceph: remove unused variable in handle_reply()

On Sat, Oct 25, 2014 at 1:12 PM, Fabian Frederick <fabf@...net.be> wrote:
>
>
>> On 23 October 2014 at 18:25 Ilya Dryomov <ilya.dryomov@...tank.com> wrote:
>>
>>
>> On Thu, Oct 23, 2014 at 8:15 PM, Fabian Frederick <fabf@...net.be> wrote:
>> > osdmap_epoch is redundant with reassert_epoch and unused.
>> >
>> > Signed-off-by: Fabian Frederick <fabf@...net.be>
>> > ---
>> >  net/ceph/osd_client.c | 2 --
>> >  1 file changed, 2 deletions(-)
>> >
>> > diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
>> > index f3fc54e..432bd75 100644
>> > --- a/net/ceph/osd_client.c
>> > +++ b/net/ceph/osd_client.c
>> > @@ -1700,7 +1700,6 @@ static void handle_reply(struct ceph_osd_client *osdc,
>> > struct ceph_msg *msg,
>> >         int err;
>> >         u32 reassert_epoch;
>> >         u64 reassert_version;
>> > -       u32 osdmap_epoch;
>> >         int already_completed;
>> >         u32 bytes;
>> >         unsigned int i;
>> > @@ -1725,7 +1724,6 @@ static void handle_reply(struct ceph_osd_client *osdc,
>> > struct ceph_msg *msg,
>> >         result = ceph_decode_32(&p);
>> >         reassert_epoch = ceph_decode_32(&p);
>> >         reassert_version = ceph_decode_64(&p);
>> > -       osdmap_epoch = ceph_decode_32(&p);
>> >
>> >         /* lookup */
>> >         down_read(&osdc->map_sem);
>>
>> Hi Fabian,
>>
>> osdmap_epoch is useful for debugging, but this is wrong anyway -
>> ceph_decode_32() has side effects.  Removing it and not adjusting *p
>> would make the whole thing blow up pretty fast..
>>
>> Thanks,
>>
>>                 Ilya
>
> Hi Ilya,
>
>         osdmap_epoch generates a warning with -Wunused-but-set-variable.
> Maybe we could just do ceph_decode_32(&p) and remove it
> (it doesn't seem to add a warning) and/or add some comment ?

I see, I'll fix it up.

Thanks,

                Ilya
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ