All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: sparclinux@vger.kernel.org
Subject: Re: RED state exception (trap type 0x64) on U5 reboot
Date: Mon, 18 Nov 2013 12:41:11 +0000	[thread overview]
Message-ID: <528A0AE7.3020803@hurleysoftware.com> (raw)
In-Reply-To: <alpine.SOC.1.00.1310151347070.902@math.ut.ee>

On 11/18/2013 01:21 AM, Meelis Roos wrote:
>> This patch seems to switch ldata with its read_buf and echo_buf from
>> kmalloc/kfree to vmalloc/vfree (the bufs are now inlined in ldata, not
>> separately allocated).
>>
>> More fields in ldata are now explicitly initialized to zero instead of
>> kzalloc doing it before. However, I do not see the initialization of
>> some of the fields - maybe they are done later in the code? I noticed
>> process_char_map, raw, real_raw, icanon, read_buf, echo_buf that were
>> zeroed before but I did not find explicit zeroing of them after the
>> patch. However, just adding a memset to zero ldata after vmalloc does
>> not change anything.
>>
>> Openpromfs does not seem to be changed after 3.11 and it does not seem
>> to use any tty layer functions.
>>
>> I still have no idea how it would interact.
>
> I turned off most imaginable debug options - pagealloc, kobject, lockdep
> and kmemcheck among others. Lockdep got one on still working kernel,
> with the state just at the bad commit, on shutdown:
>
> ===========================
> [ INFO: possible circular locking dependency detected ]
> 3.11.0-rc2-00058-g20bafb3-dirty #121 Tainted: G        W
> -------------------------------------------------------
> bash/2383 is trying to acquire lock:
>   (&tty->termios_rwsem){++++.+}, at: [<0000000000633648>] n_tty_read+0x368/0x620
>
> but task is already holding lock:
>   (&ldata->atomic_read_lock){+.+.+.}, at: [<000000000063343c>] n_tty_read+0x15c/0x620
>
> which lock already depends on the new lock.

This is a false positive lockdep report that was fixed
with commit aefceaf453024ef4cf8a0f93c4b1edf6c6f748bf,
'n_tty: Fix termios_rwsem lockdep false positive', which
was added in 3.12-rc3.

>   [00000000004060b4] linux_sparc_syscall32+0x34/0x40
>
> This is UP machine so the race probably did not happen?

Even on SMP there is no race (and thus no deadlock) because
the CPU holding the termios_rwsem has a read lock and thus
cannot prevent the other CPU from also acquiring a read lock
while holding the atomic_read_lock.

Regards,
Peter Hurley



  parent reply	other threads:[~2013-11-18 12:41 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 11:51 RED state exception (trap type 0x64) on U5 reboot Meelis Roos
2013-10-21  8:58 ` Meelis Roos
2013-10-23 15:00 ` Peter Hurley
2013-10-24 11:48 ` Meelis Roos
2013-11-17 20:35 ` Meelis Roos
2013-11-17 20:52 ` Meelis Roos
2013-11-18  6:21 ` Meelis Roos
2013-11-18 12:41 ` Peter Hurley [this message]
2013-11-18 13:51 ` Peter Hurley
2013-11-18 15:46 ` Meelis Roos
2013-11-19 14:23 ` Peter Hurley
2013-11-20 11:50 ` Peter Hurley
2013-11-27 17:39 ` Meelis Roos
2013-11-28  1:38 ` Meelis Roos
2013-11-28 16:47 ` Meelis Roos
2013-11-29  7:31 ` Meelis Roos
2013-11-30 21:42 ` Meelis Roos
2013-11-30 23:04 ` Peter Hurley
2013-11-30 23:07 ` Peter Hurley
2013-12-01  1:18 ` Peter Hurley
2013-12-01  1:31 ` Meelis Roos
2013-12-01  1:32 ` Meelis Roos
2013-12-01  2:07 ` Peter Hurley
2013-12-01  2:40 ` Peter Hurley
2013-12-01  8:16 ` Meelis Roos
2013-12-01 14:39 ` Peter Hurley
2013-12-03 16:11 ` Meelis Roos
2013-12-03 16:47 ` Peter Hurley
2013-12-04 15:35 ` Meelis Roos
2013-12-06 15:54 ` Peter Hurley
2014-06-16  9:21 ` Meelis Roos
2014-06-16 14:37 ` Peter Hurley
2014-06-16 15:14 ` Christoph Lameter
2014-06-17 10:38 ` Meelis Roos
2014-06-17 14:14 ` Christoph Lameter
2014-06-17 15:50 ` Meelis Roos

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=528A0AE7.3020803@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=sparclinux@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.