Re: [PATCH] lib/string_helpers.c: fix infinite loop in string_get_size()

2015-09-14 Thread Andy Shevchenko
On Mon, 2015-09-14 at 14:43 +0200, Vitaly Kuznetsov wrote: > Andy Shevchenko writes: > > > On Fri, 2015-09-11 at 18:31 +, James Bottomley wrote: > > > On Thu, 2015-09-10 at 16:08 -0700, Andrew Morton wrote: > > > > On Fri, 4 Sep 2015 14:56:33 +0200 Vitaly Kuznetsov < > > > > vkuzn...@redhat.

Re: [PATCH] lib/string_helpers.c: fix infinite loop in string_get_size()

2015-09-14 Thread Vitaly Kuznetsov
Andy Shevchenko writes: > On Fri, 2015-09-11 at 18:31 +, James Bottomley wrote: >> On Thu, 2015-09-10 at 16:08 -0700, Andrew Morton wrote: >> > On Fri, 4 Sep 2015 14:56:33 +0200 Vitaly Kuznetsov < >> > vkuzn...@redhat.com> wrote: >> > >> > > string_get_size(1, 512, 0, ..., ...) call results

Re: [PATCH] lib/string_helpers.c: fix infinite loop in string_get_size()

2015-09-14 Thread Vitaly Kuznetsov
James Bottomley writes: > On Fri, 2015-09-04 at 14:56 +0200, Vitaly Kuznetsov wrote: >> string_get_size(1, 512, 0, ..., ...) call results in an infinite loop. The >> problem is that if size == 0 when we start calculating sf_cap this loop >> will never end. >> >> The caller causing the issue is s

Re: [PATCH] lib/string_helpers.c: fix infinite loop in string_get_size()

2015-09-14 Thread Vitaly Kuznetsov
James Bottomley writes: > On Thu, 2015-09-10 at 16:08 -0700, Andrew Morton wrote: >> On Fri, 4 Sep 2015 14:56:33 +0200 Vitaly Kuznetsov >> wrote: >> >> > string_get_size(1, 512, 0, ..., ...) call results in an infinite loop. The >> > problem is that if size == 0 when we start calculating sf_c

Re: [PATCH] lib/string_helpers.c: fix infinite loop in string_get_size()

2015-09-14 Thread Andy Shevchenko
On Fri, 2015-09-11 at 18:31 +, James Bottomley wrote: > On Thu, 2015-09-10 at 16:08 -0700, Andrew Morton wrote: > > On Fri, 4 Sep 2015 14:56:33 +0200 Vitaly Kuznetsov < > > vkuzn...@redhat.com> wrote: > > > > > string_get_size(1, 512, 0, ..., ...) call results in an infinite > > > loop. The

Re: [PATCH] lib/string_helpers.c: fix infinite loop in string_get_size()

2015-09-11 Thread James Bottomley
On Thu, 2015-09-10 at 16:08 -0700, Andrew Morton wrote: > On Fri, 4 Sep 2015 14:56:33 +0200 Vitaly Kuznetsov > wrote: > > > string_get_size(1, 512, 0, ..., ...) call results in an infinite loop. The > > problem is that if size == 0 when we start calculating sf_cap this loop > > will never end.

Re: [PATCH] lib/string_helpers.c: fix infinite loop in string_get_size()

2015-09-10 Thread James Bottomley
On Fri, 2015-09-04 at 14:56 +0200, Vitaly Kuznetsov wrote: > string_get_size(1, 512, 0, ..., ...) call results in an infinite loop. The > problem is that if size == 0 when we start calculating sf_cap this loop > will never end. > > The caller causing the issue is sd_read_capacity(), the problem wa

Re: [PATCH] lib/string_helpers.c: fix infinite loop in string_get_size()

2015-09-10 Thread Andrew Morton
On Fri, 4 Sep 2015 14:56:33 +0200 Vitaly Kuznetsov wrote: > string_get_size(1, 512, 0, ..., ...) call results in an infinite loop. The > problem is that if size == 0 when we start calculating sf_cap this loop > will never end. > > The caller causing the issue is sd_read_capacity(), the problem

[PATCH] lib/string_helpers.c: fix infinite loop in string_get_size()

2015-09-04 Thread Vitaly Kuznetsov
string_get_size(1, 512, 0, ..., ...) call results in an infinite loop. The problem is that if size == 0 when we start calculating sf_cap this loop will never end. The caller causing the issue is sd_read_capacity(), the problem was noticed on Hyper-V. Signed-off-by: Vitaly Kuznetsov --- lib/stri