linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Elena Reshetova <elena.reshetova@intel.com>
Cc: mingo@redhat.com, peterz@infradead.org,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	viro@zeniv.linux.org.uk, akpm@linux-foundation.org,
	keescook@chromium.org, tglx@linutronix.de
Subject: Re: [PATCH 1/5] sched: convert sighand_struct.count to refcount_t
Date: Mon, 21 Jan 2019 18:05:12 +0100	[thread overview]
Message-ID: <20190121170511.GA8088@redhat.com> (raw)
In-Reply-To: <1547814450-18902-2-git-send-email-elena.reshetova@intel.com>

On 01/18, Elena Reshetova wrote:
>
> --- a/fs/proc/task_nommu.c
> +++ b/fs/proc/task_nommu.c
> @@ -64,7 +64,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
>  	else
>  		bytes += kobjsize(current->files);
>  
> -	if (current->sighand && atomic_read(&current->sighand->count) > 1)
> +	if (current->sighand && refcount_read(&current->sighand->count) > 1)
>  		sbytes += kobjsize(current->sighand);
>  	else
>  		bytes += kobjsize(current->sighand);

I fail to understand this code with or without the patch... I do not see
how is it possible to hit ->sighand == NULL or sighand->count == 0 in
proc_pid_status() paths.

Nevermind, this is off-topic.

Reviewed-by: Oleg Nesterov <oleg@redhat.com>


  parent reply	other threads:[~2019-01-21 17:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 12:27 [PATCH 0/5] sched refcount_t conversions Elena Reshetova
2019-01-18 12:27 ` [PATCH 1/5] sched: convert sighand_struct.count to refcount_t Elena Reshetova
2019-01-18 12:56   ` Andrea Parri
2019-01-18 17:24     ` Reshetova, Elena
2019-01-21 17:05   ` Oleg Nesterov [this message]
2019-01-18 12:27 ` [PATCH 2/5] sched: convert signal_struct.sigcnt " Elena Reshetova
2019-01-21 17:28   ` Oleg Nesterov
2019-01-22  9:11     ` Reshetova, Elena
2019-01-22  9:26       ` Peter Zijlstra
2019-01-22  9:36         ` Reshetova, Elena
2019-01-18 12:27 ` [PATCH 3/5] sched: convert numa_group.refcount " Elena Reshetova
2019-01-18 12:27 ` [PATCH 4/5] sched/task_struct: convert task_struct.usage " Elena Reshetova
2019-01-18 12:27 ` [PATCH 5/5] sched/task_struct: convert task_struct.stack_refcount " Elena Reshetova
2019-01-18 15:06 ` [PATCH 0/5] sched refcount_t conversions Andrea Parri
2019-01-18 17:41   ` Reshetova, Elena
2019-01-18 16:03 ` Peter Zijlstra
2019-01-18 17:40   ` Reshetova, Elena
2019-02-05 11:57   ` Reshetova, Elena
2019-02-05 12:31     ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190121170511.GA8088@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=elena.reshetova@intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).