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: <20170114005522.GA16952@mystictot>
Date:   Sat, 14 Jan 2017 06:25:22 +0530
From:   Shyam Saini <mayhs11saini@...il.com>
To:     Tobias Klauser <tklauser@...tanz.ch>
Cc:     hariprasad@...lsio.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cxgb4: Remove redundant memset before memcpy

On Fri, Jan 13, 2017 at 04:57:14PM +0100, Tobias Klauser wrote:
> On 2017-01-13 at 10:52:49 +0100, Shyam Saini <mayhs11saini@...il.com> wrote:
> > The region set by the call to memset, immediately overwritten by the
> > subsequent call to memcpy and thus makes the  memset redundant
> > 
> > Signed-off-by: Shyam Saini <mayhs11saini@...il.com>
> > ---
> >  drivers/net/ethernet/chelsio/cxgb4/sched.c | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/chelsio/cxgb4/sched.c b/drivers/net/ethernet/chelsio/cxgb4/sched.c
> > index cbd68a8..5725693 100644
> > --- a/drivers/net/ethernet/chelsio/cxgb4/sched.c
> > +++ b/drivers/net/ethernet/chelsio/cxgb4/sched.c
> > @@ -398,7 +398,6 @@ static struct sched_class *t4_sched_class_lookup(struct port_info *pi,
> >  		struct ch_sched_params tp;
> >  
> >  		memset(&info, 0, sizeof(info));
> 
> This memset is also redundant because info is memcpy()'ed to before
> being used in the loop (and it isn't used outside of the loop).
Thanks a lot for pointing out that.

I'll remove that too and resend it.

Regards,
Shyam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ