From: Tilman Schmidt <tilman@imap.cc>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: davem@davemloft.net, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
Hansjoerg Lipp <hjlipp@web.de>
Subject: Re: [PATCH 2.6.31-rc4] gigaset: really fix chars_in_buffer
Date: Sun, 02 Aug 2009 01:37:12 +0200 [thread overview]
Message-ID: <4A74D1A8.4000701@imap.cc> (raw)
In-Reply-To: <20090801171141.7a463347@lxorguk.ukuu.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]
Hi Alan,
thanks a lot for getting in contact with me, and for your
explanation of the rationale behind your patch.
On Sat, 1 Aug 2009 17:11:41 +0100, Alan Cox wrote:
> Is that correct. If you take a signal so the mutex_lock_interruptible
> takes the error path we'll exit any waits for characters to be flushed
> from buffers and lose the bytes in some cases ?
You are right. I'll have to change it to use non-interruptible
mutex_lock. I'll prepare a new patch.
> Thats why I didn't
> convert it - I didn't understand why it was using _interruptible at all ?
No specific reason. just the general rule to prefer sleeping
interuptibly whenever possible, because unkillable processes are
so annoying. Seeing that chars_in_buffer was declared as returning
int, I assumed (wrongly as it now turns out) that it would be
allowed to return the customary negative values for errors, so
that it could use the _interruptible variant. When I saw your
patch I read into it that zero would be the appropriate return
value for all error cases, including a signal while waiting for
the mutex. I guess there was a bit of wishful thinking in that.
Well, thanks again for your help. I'll follow up with a revised
patch.
Regards,
Tilman
--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
next prev parent reply other threads:[~2009-08-01 23:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-01 12:18 [PATCH 2.6.31-rc4] gigaset: really fix chars_in_buffer Tilman Schmidt
2009-08-01 16:11 ` Alan Cox
2009-08-01 23:37 ` Tilman Schmidt [this message]
2009-08-02 0:36 ` [PATCH v2 " Tilman Schmidt
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=4A74D1A8.4000701@imap.cc \
--to=tilman@imap.cc \
--cc=alan@linux.intel.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@davemloft.net \
--cc=hjlipp@web.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).