Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1692497
| From | Okash Khawaja <okash.khawaja@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [patch v3 0/3] tty contention resulting from tty_open_by_driver export |
| Date | 2017-07-20 09:30 +0200 |
| Message-ID | <u5e4h-41p-3@gated-at.bofh.it> (permalink) |
| References | <u4BcC-35L-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
I have updated the patches so that the exclusivity flag is in tty_port.
When closing the struct - by calling tty_release_struct - we also need
to reset the flag. One way to do that is to reset the flag inside
tty_release_struct function, regardless of whether the tty was opened
through tty_kopen or not. In order to keep the code clean, I have
instead created a separate function called tty_kclose which is the same
as tty_release_struct except that it also resets the exclusivity flag.
As a result, any changes to tty_release_struct won't be in tty_kclose
untless manually added. Please advise on this.
Here is a summary of changes when compared to v2:
- Patch 1 uses TTY_PORT_KOPENED flag instead of TTY_KOPENED and as a
result adds helper functions to read and change the flag
- Patch 1 adds tty_kclose function to close tty opened by tty_kopen
- Patch 2 calls tty_kclose instead of tty_release_struct
Thanks,
Okash
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-18 13:40 +0200
Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export Dan Carpenter <dan.carpenter@oracle.com> - 2017-07-18 14:30 +0200
Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-18 21:30 +0200
Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-07-18 16:00 +0200
[patch v3 3/3] tty: undo export of tty_open_by_driver Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-20 09:30 +0200
[patch v3 1/3] tty: resolve tty contention between kernel and user space Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-20 09:30 +0200
[patch v3 0/3] tty contention resulting from tty_open_by_driver export Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-20 09:30 +0200
[patch v3 2/3] staging: speakup: use tty_kopen and tty_kclose Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-20 09:40 +0200
csiph-web