From: Meelis Roos <mroos@linux.ee>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Dave Carroll <david.carroll@microsemi.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: News UBSAN warnings in aacraid
Date: Tue, 28 Nov 2017 15:05:38 +0200 (EET) [thread overview]
Message-ID: <alpine.LRH.2.21.1711281504580.27929@math.ut.ee> (raw)
In-Reply-To: <CAK8P3a00CC20bD2cfuJhRwrmmSte7y83a0Z2hx+CRoqQotJktA@mail.gmail.com>
> I think this chunk would solve the problem and result in the
> same behavior as before:
>
> --- a/drivers/scsi/aacraid/commsup.c
> +++ b/drivers/scsi/aacraid/commsup.c
> @@ -2511,8 +2511,8 @@ int aac_command_thread(void *data)
> /* Synchronize our watches */
> if (((NSEC_PER_SEC - (NSEC_PER_SEC / HZ)) > now.tv_nsec)
> && (now.tv_nsec > (NSEC_PER_SEC / HZ)))
> - difference = (((NSEC_PER_SEC -
> now.tv_nsec) * HZ)
> - + NSEC_PER_SEC / 2) / NSEC_PER_SEC;
> + difference = HZ + HZ / 2 -
> + now.tv_nsec / (NSEC_PER_SEC / HZ);
> else {
> if (now.tv_nsec > NSEC_PER_SEC / 2)
> ++now.tv_sec;
>
> but I don't see why we add in half a second here. Any ideas?
I did not try to understand the details but I can confirm that this
patch makes the warnings go away.
--
Meelis Roos (mroos@linux.ee)
next prev parent reply other threads:[~2017-11-28 13:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 19:17 Meelis Roos
2017-11-27 21:32 ` Arnd Bergmann
2017-11-28 13:05 ` Meelis Roos [this message]
2017-11-28 13:27 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LRH.2.21.1711281504580.27929@math.ut.ee \
--to=mroos@linux.ee \
--cc=arnd@arndb.de \
--cc=david.carroll@microsemi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®