Matt Helsley [[email protected]] wrote:
| > @@ -159,8 +160,10 @@ static int alloc_pidmap(struct pid_namespace *pid_ns)
| >     map = &pid_ns->pidmap[pid/BITS_PER_PAGE];
| >     max_scan = (pid_max + BITS_PER_PAGE - 1)/BITS_PER_PAGE - !offset;
| >     for (i = 0; i <= max_scan; ++i) {
| > -           if (alloc_pidmap_page(map))
| > +           if (alloc_pidmap_page(map)) {
| > +                   rc = -ENOMEM;
| 
| You could return -ENOMEM from alloc_pidmap_page(map) and then just:
| 
|       rc = alloc_pidmap_page(map);
|       if (rc)
|               break;

Sure. alloc_pidmap_page() can only fail for one reason so I let it stay,
but we might as well return -ENOMEM.
_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to