From: Johannes Berg <johannes@sipsolutions.net>
To: Anton Ivanov <anton.ivanov@cambridgegreys.com>,
rrs@researchut.com, linux-um@lists.infradead.org
Subject: Re: uml segfault during I/O
Date: Fri, 18 Oct 2019 10:57:15 +0200 [thread overview]
Message-ID: <7a2c14d38873a5c19f395cc7861fd9811589ca79.camel@sipsolutions.net> (raw)
In-Reply-To: <b742bf38-9cf5-e62f-55df-915929fd526f@cambridgegreys.com>
On Fri, 2019-10-18 at 08:35 +0100, Anton Ivanov wrote:
>
> Still happening with 5.2.21, albeit a bit more difficult to reproduce.
Just randomly reviewing the code, isn't there a bug in io_thread()?
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -1602,7 +1602,8 @@ int io_thread(void *arg)
written = 0;
do {
- res = os_write_file(kernel_fd, ((char *) io_req_buffer) + written, n);
+ res = os_write_file(kernel_fd, ((char *) io_req_buffer) + written,
+ n - written);
if (res >= 0) {
written += res;
}
johannes
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
next prev parent reply other threads:[~2019-10-18 8:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 11:37 uml segfault during I/O Ritesh Raj Sarraf
[not found] ` <1ccf27d8-6b6a-7d08-acef-93077f07511b@cambridgegreys.com>
2019-10-17 13:30 ` Ritesh Raj Sarraf
2019-10-17 13:33 ` Anton Ivanov
2019-10-17 15:03 ` Anton Ivanov
2019-10-17 16:29 ` Anton Ivanov
2019-10-18 7:35 ` Anton Ivanov
2019-10-18 8:57 ` Johannes Berg [this message]
2019-10-18 9:13 ` Anton Ivanov
2019-10-18 9:49 ` Anton Ivanov
2019-10-18 9:55 ` Anton Ivanov
2019-10-18 10:51 ` Anton Ivanov
2019-10-28 16:51 ` Anton Ivanov
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=7a2c14d38873a5c19f395cc7861fd9811589ca79.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=anton.ivanov@cambridgegreys.com \
--cc=linux-um@lists.infradead.org \
--cc=rrs@researchut.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