Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1376517

Re: [PATCH 04/15] task_diag: add a new interface to get information about tasks (v4)

From Cyrill Gorcunov <gorcunov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 04/15] task_diag: add a new interface to get information about tasks (v4)
Date 2016-04-12 09:10 +0200
Message-ID <rn0Ct-3dN-3@gated-at.bofh.it> (permalink)
References <rmTAZ-5Gv-3@gated-at.bofh.it> <rmTB0-5Gv-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Apr 11, 2016 at 04:35:44PM -0700, Andrey Vagin wrote:
...
> +static int __taskdiag_dumpit(struct task_iter *iter,
> +			     struct task_diag_cb *cb, struct task_struct **start)
> +{
> +	struct user_namespace *userns = current_user_ns();
> +	struct task_struct *task = *start;
> +	int rc;
> +
> +	for (; task; task = iter_next(iter)) {
> +		if (!ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS))
> +			continue;
> +
> +		rc = task_diag_fill(task, cb->resp, &iter->req,
> +				cb, iter->ns, userns);
> +		if (rc < 0) {
> +			if (rc != -EMSGSIZE)
> +				return rc;
> +			break;
> +		}
> +	}
> +	*start = task;

task = NULL always here?

> +
> +	return 0;
> +}

	Cyrill

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 04/15] task_diag: add a new interface to get information about tasks (v4) Andrey Vagin <avagin@openvz.org> - 2016-04-12 01:40 +0200
  Re: [PATCH 04/15] task_diag: add a new interface to get information  about tasks (v4) Cyrill Gorcunov <gorcunov@gmail.com> - 2016-04-12 09:10 +0200
    Re: [PATCH 04/15] task_diag: add a new interface to get information  about tasks (v4) Andrew Vagin <avagin@gmail.com> - 2016-04-13 02:40 +0200
      Re: [PATCH 04/15] task_diag: add a new interface to get information  about tasks (v4) Cyrill Gorcunov <gorcunov@gmail.com> - 2016-04-13 07:30 +0200
  Re: [PATCH 04/15] task_diag: add a new interface to get information  about tasks (v4) Andrew Vagin <avagin@virtuozzo.com> - 2016-04-13 05:30 +0200

csiph-web