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: <20200526202425.GH22511@kadam>
Date:   Tue, 26 May 2020 23:24:25 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Gaurav Pathak <gauravpathak129@...il.com>
Cc:     abbotti@....co.uk, gregkh@...uxfoundation.org,
        hsweeten@...ionengravers.com, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org,
        Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Subject: Re: [PATCH v3] Staging: comedi: dt2814: remove unused assignments

Oh, crap.  I'm really sorry but these lines of code can't be deleted.
Luc was suggesting that earlier and I saw what he said but I was sure
they could be deleted.  Now that I look at it more closely I see I was
wrong.

	hi = inb(dev->iobase + DT2814_DATA);
	lo = inb(dev->iobase + DT2814_DATA);

Every time we read from DT2814_DATA we get different data.  The first
time we get the byte and the second time we get the low byte.  In other
words reading from the register has side effects so if we delete a read
then the next thing to read from there will get the data that we were
supposed to read.

What we could do instead would be to remove the "hi = " assignment.
There is one other places where the assignment is not used.

	i = inb(dev->iobase + DT2814_DATA);
	i = inb(dev->iobase + DT2814_DATA);

I feel really bad for not seeing this earlier.  I know everyone hates
redoing patches.  I certain hate redoing patches.  This one was my
fault.  :/  The v3 was in the right format and all, but it will cause a
bug.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ