Commit 193155c
committed
io_uring: handle multiple personalities in link chains
If we have a chain of requests and they don't all use the same
credentials, then the head of the chain will be issued with the
credentails of the tail of the chain.
Ensure __io_queue_sqe() overrides the credentials, if they are different.
Once we do that, we can clean up the creds handling as well, by only
having io_submit_sqe() do the lookup of a personality. It doesn't need
to assign it, since __io_queue_sqe() now always does the right thing.
Fixes: 75c6a03 ("io_uring: support using a registered personality for commands")
Reported-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent f8788d8 commit 193155c
1 file changed
Lines changed: 15 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4705 | 4705 | | |
4706 | 4706 | | |
4707 | 4707 | | |
| 4708 | + | |
4708 | 4709 | | |
4709 | 4710 | | |
4710 | 4711 | | |
4711 | 4712 | | |
4712 | 4713 | | |
| 4714 | + | |
| 4715 | + | |
| 4716 | + | |
| 4717 | + | |
| 4718 | + | |
| 4719 | + | |
| 4720 | + | |
| 4721 | + | |
| 4722 | + | |
4713 | 4723 | | |
4714 | 4724 | | |
4715 | 4725 | | |
| |||
4759 | 4769 | | |
4760 | 4770 | | |
4761 | 4771 | | |
| 4772 | + | |
| 4773 | + | |
4762 | 4774 | | |
4763 | 4775 | | |
4764 | 4776 | | |
| |||
4803 | 4815 | | |
4804 | 4816 | | |
4805 | 4817 | | |
4806 | | - | |
4807 | 4818 | | |
4808 | 4819 | | |
4809 | 4820 | | |
| |||
4818 | 4829 | | |
4819 | 4830 | | |
4820 | 4831 | | |
4821 | | - | |
4822 | | - | |
4823 | | - | |
4824 | | - | |
| 4832 | + | |
| 4833 | + | |
4825 | 4834 | | |
4826 | 4835 | | |
4827 | 4836 | | |
4828 | | - | |
| 4837 | + | |
4829 | 4838 | | |
4830 | 4839 | | |
4831 | 4840 | | |
| |||
4837 | 4846 | | |
4838 | 4847 | | |
4839 | 4848 | | |
4840 | | - | |
4841 | | - | |
4842 | 4849 | | |
4843 | 4850 | | |
4844 | 4851 | | |
| |||
4899 | 4906 | | |
4900 | 4907 | | |
4901 | 4908 | | |
4902 | | - | |
4903 | | - | |
4904 | 4909 | | |
4905 | 4910 | | |
4906 | 4911 | | |
| |||
0 commit comments