mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <Ulrich.Weigand@de.ibm.com>
To: Martin Wilck <Martin.Wilck@fujitsu-siemens.com>
Cc: Linux Kernel mailing list <linux-kernel@vger.kernel.org>,
	Gerhard Wichert <Gerhard.Wichert@fujitsu-siemens.com>
Subject: Re: [PATCH] Bug in 2.4.5 in proc_pid_make_inode ()
Date: Thu, 28 Jun 2001 21:03:08 +0200	[thread overview]
Message-ID: <OF2F8AF5FE.1F3D1D3A-ONC1256A79.0067C5E1@de.ibm.com> (raw)

Martin Wilck wrote:

>I have recently experienced a number of kernel OOPSes
>in "top" under heavy load. Kernel is 2.4.5 (IA64, but
>this has nothing to do the IA64 patch).

Same here; I just debugged these on S/390 ...

>I have seen 2.4.6-pre6 contains changes to this subroutine as well,
>but they seem to be attacking a different problem.
>Having analyzed the stack trace and the kernel code with objdump,
>I am pretty certain that the changes in 2.4.6-pre6 do not fix my problem
>(if they did, I would see a crash in proc_pid_delete_inode rather
>than in proc_delete_inode).

I think the -pre6 code should be OK.  Note that the crash in
proc_delete_inode() occurs because the pointer to the parent
proc_dir_entry (which is taken from inode->u.generic_ip) is
non-zero.

In 2.4.5, this is the case because proc_pid_make_inode
assigns a value to inode->u.proc_i.task before calling iput().
That field overlays inode->u.generic_ip ...

In the 2.4.6-pre patches, the test for a zero pid is moved to
*before* assigning to inode->u.proc_i.task.  Therefore, when
iput calls proc_delete_inode(), the 'de' pointer will be
zero, and nothing will happen.

Whether this is particularly pretty is debateable, but it
appears to be correct.


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com



             reply	other threads:[~2001-06-28 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-28 19:03 Ulrich Weigand [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-06-28 18:32 Martin Wilck
2001-06-28 19:03 ` Alexander Viro

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=OF2F8AF5FE.1F3D1D3A-ONC1256A79.0067C5E1@de.ibm.com \
    --to=ulrich.weigand@de.ibm.com \
    --cc=Gerhard.Wichert@fujitsu-siemens.com \
    --cc=Martin.Wilck@fujitsu-siemens.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®