mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Kirk Reiser <kirk@braille.uwo.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: help needed with acquire/release_console_sem() problem.
Date: Wed, 7 Apr 2004 13:49:25 -0700	[thread overview]
Message-ID: <20040407134925.3ab67fba.rddunlap@osdl.org> (raw)
In-Reply-To: <x74qsddjnj.fsf@speech.braille.uwo.ca>

On Thu, 25 Mar 2004 10:35:28 -0500 Kirk Reiser wrote:

| Hello folks:  I am hoping someone may be able to help me with a
| problem I have been experiencing since the release of 2.6.3.  It
| appears that because of the likeliness of race conditions occuring
| while accessing console services acquire_console_sem() and
| release_console_sem() were placed around sections of code which could
| lead to these races.
| 
| In my speakup console code I tried to put the same functions around
| possible problem code with the result that it locks up the computer to
| the point of a hardware reset being necessary.  I have placed the code
| in my functions for cutting and pasting portions of screen memory
| which is where the new changes address the problem to some extent in
| the kernel code.  The comments to release_console_sem() state that the
| functions are safe and may be called from any context

release_console_sem() comment says that.  acquire() does not.

| but either that
| isn't true or because I am in kernelspace I cannot schedule() off.  I

Why do you want to call schedule()?

| am not exactly sure what the reasoning is or how to get around the
| situation so if anyone has any suggestions I'd love to hear about it.

Are you using preempt (CONFIG_PREEMPT)?  Would it cause any
scheduling or semaphore problems or differences?

| What I currently do is mark portions of screen memory and then call
| set_selection and paste_selection with the marked region of memory
| which is what other functions seem to do to provide copy and paste
| facilities.  I cannot just ignore the situation because the acquire
| and release_console_sem() calls have been placed around portions of
| that code as well such as clear_selection and paste_selection().

I suppose that you could post some real code to see if someone
sees any problems in it.

--
~Randy
"We have met the enemy and he is us."  -- Pogo (by Walt Kelly)
(Again.  Sometimes I think ln -s /usr/src/linux/.config .signature)

      reply	other threads:[~2004-04-07 20:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25 15:35 Kirk Reiser
2004-04-07 20:49 ` Randy.Dunlap [this message]

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=20040407134925.3ab67fba.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=kirk@braille.uwo.ca \
    --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

Powered by JetHome