uml: SIGIO support cleanup
Cleanup of the SIGWINCH support. Some code and comment reformatting. The stack used for SIGWINCH threads was leaked. This is now fixed by storing it with the pid and other information, and freeing it when the thread is killed. If something goes wrong with a WIGWINCH thread, and this is discovered in the interrupt handler, the winch record would leak. It is now freed, except that the IRQ isn't freed. This is hard to do from interrupt context. This has the side-effect that the IRQ system maintains a reference to the freed structure, but that shouldn't cause a problem since the descriptor is disabled. register_winch_irq is now much better about cleaning up after an initialization failure. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
d14ad81f80
commit
42a359e31a
@@ -42,7 +42,8 @@ extern void generic_free(void *data);
|
||||
|
||||
struct tty_struct;
|
||||
extern void register_winch(int fd, struct tty_struct *tty);
|
||||
extern void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty);
|
||||
extern void register_winch_irq(int fd, int tty_fd, int pid,
|
||||
struct tty_struct *tty, unsigned long stack);
|
||||
|
||||
#define __channel_help(fn, prefix) \
|
||||
__uml_help(fn, prefix "[0-9]*=<channel description>\n" \
|
||||
|
Reference in New Issue
Block a user