lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A74D1A8.4000701@imap.cc>
Date:	Sun, 02 Aug 2009 01:37:12 +0200
From:	Tilman Schmidt <tilman@...p.cc>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	davem@...emloft.net, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, Alan Cox <alan@...ux.intel.com>,
	Hansjoerg Lipp <hjlipp@....de>
Subject: Re: [PATCH 2.6.31-rc4] gigaset: really fix chars_in_buffer

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@...p.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


Download attachment "signature.asc" of type "application/pgp-signature" (255 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ