From: Peter Hurley Date: Mon, 11 Mar 2013 20:44:40 +0000 (-0400) Subject: tty: Separate release semantics of ldisc reference X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~136^2~56 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebc9baed42e42f9b51cf61672b7afb72f068d523;p=pandora-kernel.git tty: Separate release semantics of ldisc reference tty_ldisc_ref()/tty_ldisc_unref() have usage semantics equivalent to down_read_trylock()/up_read(). Only callers of tty_ldisc_put() are performing the additional operations necessary for proper ldisc teardown, and then only after ensuring no outstanding 'read lock' remains. Thus, tty_ldisc_unref() should never be the last reference; WARN if it is. Conversely, tty_ldisc_put() should never be destructing if the use count != 1. Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed