lkml.org 
[lkml]   [1998]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: VIOLENT 2.1.129 serial bug on Alpha.
On Tue, 24 Nov 1998, Theodore Y. Ts'o wrote:

> Shouldn't all seven references to MOD_DEC_USE_COUNT within rs_open be
> removed? As I see from tty_open (in tty_io.c), rs_close is always called
> after an unsuccessful rs_open. As rs_close always calls
> MOD_DEC_USE_COUNT, there is no need (and it's even harmful) to do this
> from rs_open.
>
> No, because rs_close() only calls MOD_DEC_USE_COUNT if tty->driver_data
> is non-NULL.

I now see it -- I haven't noticed info being initialized at the top of
variable definitions. My fault...

> The change I submitted was the simplest set of changes which fix the
> problem, without completely revamping how the module in-use counter
> works for the serial driver.

You're probably right, though I still believe adding MOD_DEC_USE_COUNT
after:

if (!info || serial_paranoia_check(info, tty->device, "rs_close"))

and removing all MOD_DEC_USE_COUNTs from rs_open would result in a
somewhat cleaner code.

--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.050 / U:2.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site