public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Paul Mackerras <paulus@samba.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix thinko in iov_iter_single_seg_count
Date: Thu, 13 Nov 2014 13:05:09 +0000	[thread overview]
Message-ID: <20141113130509.GI7996@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20141113091523.GC26910@iris.ozlabs.ibm.com>

On Thu, Nov 13, 2014 at 08:15:23PM +1100, Paul Mackerras wrote:
> The branches of the if (i->type & ITER_BVEC) statement in
> iov_iter_single_seg_count() are the wrong way around; if ITER_BVEC is
> clear then we use i->bvec, when we should be using i->iov.  This fixes
> it.
> 
> In my case, the symptom that this caused was that a KVM guest doing
> filesystem operations on a virtual disk would result in one of qemu's
> threads on the host going into an infinite loop in
> generic_perform_write().  The loop would hit the copied == 0 case and
> call iov_iter_single_seg_count() to reduce the number of bytes to try
> to process, but because of the error, iov_iter_single_seg_count()
> would just return i->count and the loop made no progress and continued
> forever.

ACK.  Applied, will push today.

      reply	other threads:[~2014-11-13 13:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13  9:15 [PATCH] Fix thinko in iov_iter_single_seg_count Paul Mackerras
2014-11-13 13:05 ` Al Viro [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=20141113130509.GI7996@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=torvalds@linux-foundation.org \
    /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