From: Peng Haitao <penght@cn.fujitsu.com>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] fsync02: fix error of overflow from MUL
Date: Wed, 19 Jan 2011 17:09:00 +0800 [thread overview]
Message-ID: <4D36AA2C.9050009@cn.fujitsu.com> (raw)
In-Reply-To: <AANLkTi=z3=QTuMR5ofejRB=8A95WXHc8MKT-0+syVv-W@mail.gmail.com>
Hi Garrett,
Garrett Cooper said the following on 2011-1-19 16:47:
>
> How about the following item?
> Please try the attached patch over the following -- it's just
> there for review.
The patch is OK, thanks:)
--
Best Regards,
Peng Haitao
> Thanks,
> -Garrett
>
> $ git diff testcases/kernel/syscalls/fsync/fsync02.c
> diff --git a/testcases/kernel/syscalls/fsync/fsync02.c
> b/testcases/kernel/syscalls/fsync/fsync02.c
> index 213eac3..6227a84 100644
> --- a/testcases/kernel/syscalls/fsync/fsync02.c
> +++ b/testcases/kernel/syscalls/fsync/fsync02.c
> @@ -102,7 +102,8 @@ int main(int ac, char **av)
> }
>
> for (i = 1; i <= data_blocks; i++) {
> - offset = (i * BLOCKSIZE * max_block) /
> data_blocks - BUFSIZ;
> + offset = i * ((BLOCKSIZE * max_block) / data_blocks);
> + offset -= BUFSIZ;
> if ((offsetret = lseek(fd, offset, SEEK_SET)) != offset)
> tst_brkm(TBROK|TERRNO, cleanup, "lseek
> failed: %ld, %ld", offsetret, offset);
> if ((ret = write(fd, pbuf, BUFSIZ)) != BUFSIZ)
> @@ -197,4 +198,4 @@ void cleanup()
>
> tst_rmdir();
>
> -}
> \ No newline at end of file
> +}
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2011-01-19 9:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 8:19 [LTP] [PATCH] fsync02: fix error of overflow from MUL Peng Haitao
2011-01-19 8:47 ` Garrett Cooper
2011-01-19 9:09 ` Peng Haitao [this message]
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=4D36AA2C.9050009@cn.fujitsu.com \
--to=penght@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=yanegomi@gmail.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