]> git.baikalelectronics.ru Git - kernel.git/commit
net/irda: Fix port open counts
authorPeter Hurley <peter@hurleysoftware.com>
Tue, 5 Mar 2013 06:09:04 +0000 (06:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Mar 2013 07:47:04 +0000 (02:47 -0500)
commit99a35bf65f133690f5e473a24e3ee5500bb2e7d6
tree6cc188dc7dd206790023fb360af4b1a886611855
parent8404d627b50b4a9a6fddaf64ce1cff498c01ab44
net/irda: Fix port open counts

Saving the port count bump is unsafe. If the tty is hung up while
this open was blocking, the port count is zeroed.

Explicitly check if the tty was hung up while blocking, and correct
the port count if not.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/irda/ircomm/ircomm_tty.c