lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 09 Sep 2008 09:26:20 -0700
From:	Dave Hansen <dave@...ux.vnet.ibm.com>
To:	Oren Laadan <orenl@...columbia.edu>
Cc:	containers@...ts.linux-foundation.org, jeremy@...p.org,
	linux-kernel@...r.kernel.org, arnd@...db.de
Subject: Re: [RFC v4][PATCH 9/9] File descriprtors (restore)

On Tue, 2008-09-09 at 03:42 -0400, Oren Laadan wrote:
> 
> +static int cr_close_all_fds(struct files_struct *files)
> +{
> +       int *fdtable;
> +       int n;
> +
> +       do {
> +               n = cr_scan_fds(files, &fdtable);
> +               if (n < 0)
> +                       return n;
> +               while (n--)
> +                       sys_close(fdtable[n]);
> +               kfree(fdtable);
> +       } while (n != -1);
> +
> +       return 0;
> +}

This needs to use an ERR_PTR().  It will save using the double-pointer.

-- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ