lkml.org 
[lkml]   [2014]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix thinko in iov_iter_single_seg_count
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.


\
 
 \ /
  Last update: 2014-11-13 14:41    [W:0.032 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site