mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Chen Gang <gang.chen@asianux.com>
Cc: bsingharora@gmail.com,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kernel/delayacct.c: check NULL for member variable 'delays' in all extern functions.
Date: Wed, 21 Aug 2013 15:10:25 -0700	[thread overview]
Message-ID: <20130821151025.77673f0f3cad748a80086a16@linux-foundation.org> (raw)
In-Reply-To: <5212D703.5080405@asianux.com>

On Tue, 20 Aug 2013 10:40:03 +0800 Chen Gang <gang.chen@asianux.com> wrote:

> The member variable 'delays' may be NULL, so need check NULL before use
> it for all extern functions, just like __delayacct_tsk_init() and
> __delayacct_add_tsk() have already done.

If task.delays is NULL, the kernel will oops.  I don't recall seeing
such oops reports hence I suspect that you missed some check somewhere.

For example, delayacct_blkio_start() checks current->delays before
calling __delayacct_blkio_start(), so why retest current->delays in
__delayacct_blkio_start()?

  parent reply	other threads:[~2013-08-21 22:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20  2:40 Chen Gang
2013-08-20  2:44 ` [PATCH] kernel/taskstats.c: add nla_nest_cancel() for failure processing between nla_nest_start() and nla_nest_end() Chen Gang
2013-09-03  5:07   ` Chen Gang
2013-08-21 22:10 ` Andrew Morton [this message]
2013-08-22  2:17   ` [PATCH] kernel/delayacct.c: check NULL for member variable 'delays' in all extern functions Chen Gang
2013-09-03  5:03     ` [PATCH] kernel/delayacct.c: remove redundancy checking in __delayacct_add_tsk() Chen Gang

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=20130821151025.77673f0f3cad748a80086a16@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bsingharora@gmail.com \
    --cc=gang.chen@asianux.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®