Displaying 6 results from an estimated 6 matches for "99d613b".
Did you mean:
995613
2015 Jul 15
2
[patch] vhost: NULL vs ERR_PTR bug
...le would probably expect that so let's
change ERR_PTR(-ENOMEM) to NULL.
Fixes: 4de7255f7d2b ('vhost: extend memory regions allocation to vmalloc')
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index a9fe859..99d613b 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -686,7 +686,7 @@ static void *vhost_kvzalloc(unsigned long size)
if (!n) {
n = vzalloc(size);
if (!n)
- return ERR_PTR(-ENOMEM);
+ return NULL;
}
return n;
}
2015 Jul 15
2
[patch] vhost: NULL vs ERR_PTR bug
...le would probably expect that so let's
change ERR_PTR(-ENOMEM) to NULL.
Fixes: 4de7255f7d2b ('vhost: extend memory regions allocation to vmalloc')
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index a9fe859..99d613b 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -686,7 +686,7 @@ static void *vhost_kvzalloc(unsigned long size)
if (!n) {
n = vzalloc(size);
if (!n)
- return ERR_PTR(-ENOMEM);
+ return NULL;
}
return n;
}
2015 Jul 15
3
[patch] vhost: NULL vs ERR_PTR bug
...s into Igor's patch and redo my pull request.
>
Is this function needed at all ?
e.g. I followed vzalloc() to __vmalloc_node_range()
a check for size==0 seems to be done there.
re,
wh
>>
>> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
>> index a9fe859..99d613b 100644
>> --- a/drivers/vhost/vhost.c
>> +++ b/drivers/vhost/vhost.c
>> @@ -686,7 +686,7 @@ static void *vhost_kvzalloc(unsigned long size)
>> if (!n) {
>> n = vzalloc(size);
>> if (!n)
>> - return ERR_PTR(-ENOMEM);
>> + return NULL;
>&...
2015 Jul 15
3
[patch] vhost: NULL vs ERR_PTR bug
...s into Igor's patch and redo my pull request.
>
Is this function needed at all ?
e.g. I followed vzalloc() to __vmalloc_node_range()
a check for size==0 seems to be done there.
re,
wh
>>
>> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
>> index a9fe859..99d613b 100644
>> --- a/drivers/vhost/vhost.c
>> +++ b/drivers/vhost/vhost.c
>> @@ -686,7 +686,7 @@ static void *vhost_kvzalloc(unsigned long size)
>> if (!n) {
>> n = vzalloc(size);
>> if (!n)
>> - return ERR_PTR(-ENOMEM);
>> + return NULL;
>&...
2015 Jul 15
0
[patch] vhost: NULL vs ERR_PTR bug
...penter <dan.carpenter at oracle.com>
Ouch. Thanks a lot for noticing this, and it's a good thing
you did before Linus merged it.
I'll squash this into Igor's patch and redo my pull request.
>
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index a9fe859..99d613b 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -686,7 +686,7 @@ static void *vhost_kvzalloc(unsigned long size)
> if (!n) {
> n = vzalloc(size);
> if (!n)
> - return ERR_PTR(-ENOMEM);
> + return NULL;
> }
> return n;
> }
2015 Jul 15
0
[patch] vhost: NULL vs ERR_PTR bug
...oc_node_range()
>
> a check for size==0 seems to be done there.
At least it looks like one could return the result of vzalloc directly?
julia
>
> re,
> wh
>
>
> >>
> >> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> >> index a9fe859..99d613b 100644
> >> --- a/drivers/vhost/vhost.c
> >> +++ b/drivers/vhost/vhost.c
> >> @@ -686,7 +686,7 @@ static void *vhost_kvzalloc(unsigned long size)
> >> if (!n) {
> >> n = vzalloc(size);
> >> if (!n)
> >> - return ERR_PTR(-ENOME...