Re: [PATCH 1/4] TTY: drop driver reference in tty_open fail path

From: Sukadev Bhattiprolu
Date: Sun Oct 16 2011 - 14:27:08 EST


Jiri Slaby [jslaby@xxxxxxx] wrote:
| When tty_driver_lookup_tty fails in tty_open, we forget to drop a
| reference to the tty driver. This was added by commit 4a2b5fddd5 (Move
| tty lookup/reopen to caller).
|
| Fix that by adding tty_driver_kref_put to the fail path.

Arg. Sorry about that. Thanks for spotting/fixing it.

|
| I will refactor the code later. This is for the ease of backporting to
| stable.
|
| Introduced-in: v2.6.28-rc2
| Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
| Cc: stable@xxxxxxxxxx
| Cc: Sukadev Bhattiprolu <sukadev@xxxxxxxxxx>
| Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
| Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>

Acked-by: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx>

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