From: Bodo Eggert <7eggert@gmx.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Adam Tla?ka <atlka@pg.gda.pl>,
linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: [PATCH 0/1] SIGWINCH problem with terminal apps still alive
Date: Sat, 11 Oct 2008 16:04:07 +0200 [thread overview]
Message-ID: <E1Kof4h-0005Q3-Ns@be1.7eggert.dyndns.org> (raw)
In-Reply-To: <blmDC-7ZU-7@gated-at.bofh.it>
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> Adam Tla?ka <atlka@pg.gda.pl> wrote:
>> now we have 2.6.26.6 kernel and still terminal resize leads to
>> undesired effects. It is very inconvenient to wait for 2.6.27 for
>> corrections.
You'll have to wait some longer, since it still has this bug.
>> As Alan Cox previously said mutexes generally work but as we can
>> observe in case of kill_pgrp() call inside mutex lock we got
>> race because of rescheduling so lock is not working here.
>> Rearanging code so the variable change is placed before kill_pgrp()
>> call removes mentioned race situaction.
> NAK again
>
> Moving the copies around simply moves the race, it might be that it fixes
> your box and unfixes other peoples.
This patch does not move around any race, but it works around a locking issue
by making sure you are the hedgehog racing the rabbit.
However, you are right in spotting that there must be something wrong with
the resulting code. It does (still) modify both tty and the real_tty while
only holding one lock. Besides that, it depends on tty->mutex to prevent
reading the old values because real_tty->mutex is held.
Adam, since you are working on this issue, I'd suggest you modify the source
to take both locks, one at a time, while setting the new values (lock
tty->mutex, compare tty->ws, possibly set ws, unlock, lock real_tty, ...).
Alan, do you agree? Or is it required to take both locks at the same time?
If it is, in which order?
next parent reply other threads:[~2008-10-11 13:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bjXel-4CU-17@gated-at.bofh.it>
[not found] ` <bjYap-5Q0-25@gated-at.bofh.it>
[not found] ` <bk30i-3Gx-1@gated-at.bofh.it>
[not found] ` <bk6AV-8ms-7@gated-at.bofh.it>
[not found] ` <bkrvO-1HF-49@gated-at.bofh.it>
[not found] ` <blePJ-6rI-3@gated-at.bofh.it>
[not found] ` <blmDC-7ZU-7@gated-at.bofh.it>
2008-10-11 14:04 ` Bodo Eggert [this message]
2008-10-11 17:58 ` Alan Cox
2008-10-12 12:32 ` [PATCH 0/2] " Adam Tlałka
2008-10-12 14:22 ` Alan Cox
2008-10-12 17:59 ` Adam Tlałka
2008-10-12 18:03 ` Alan Cox
2008-10-12 19:01 ` Adam Tlałka
2008-10-12 20:22 ` Alan Cox
2008-10-13 9:59 ` Bodo Eggert
2008-10-13 10:01 ` Alan Cox
2008-10-13 12:07 ` Bodo Eggert
2008-10-14 12:51 ` [PATCH 0/3] " Adam Tlałka
2008-10-14 14:11 ` [PATCH 0/4] " Adam Tlałka
2008-10-16 10:27 ` [PATCH 0/5] " Adam Tlałka
2008-10-16 10:52 ` Alan Cox
2008-10-16 11:43 ` Adam Tlałka
2008-10-17 8:39 ` Adam Tlałka
2008-10-06 12:07 [PATCH 0/0] SIGWINCH problem with terminal apps Adam Tlałka
2008-10-06 13:13 ` Alan Cox
2008-10-06 18:28 ` Adam Tlałka
2008-10-06 22:14 ` Alan Cox
2008-10-07 20:28 ` Adam Tlałka
2008-10-10 1:12 ` [PATCH 0/1] SIGWINCH problem with terminal apps still alive Adam Tlałka
2008-10-10 3:32 ` Adam Tlałka
2008-10-10 9:29 ` Alan Cox
2008-10-10 10:35 ` Adam Tlałka
2008-10-10 11:56 ` Adam Tlałka
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=E1Kof4h-0005Q3-Ns@be1.7eggert.dyndns.org \
--to=7eggert@gmx.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=atlka@pg.gda.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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®