Repository navigation
Commit 1da9277
Al Viro
aio: sanitize the limit checking in io_submit(2)
as it is, the logics in native io_submit(2) is "if asked for
more than LONG_MAX/sizeof(pointer) iocbs to submit, don't
bother with more than LONG_MAX/sizeof(pointer)" (i.e.
512M requests on 32bit and 1E requests on 64bit) while
compat io_submit(2) goes with "stop after the first
PAGE_SIZE/sizeof(pointer) iocbs", i.e. 1K or so. Which is
* inconsistent
* *way* too much in native case
* possibly too little in compat one
and
* wrong anyway, since the natural point where we
ought to stop bothering is ctx->nr_events
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>1 parent 67ba049 commit 1da9277
1 file changed
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1841 | 1841 | | |
1842 | 1842 | | |
1843 | 1843 | | |
1844 | | - | |
1845 | | - | |
1846 | | - | |
1847 | 1844 | | |
1848 | 1845 | | |
1849 | 1846 | | |
1850 | 1847 | | |
1851 | 1848 | | |
1852 | 1849 | | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
1853 | 1853 | | |
1854 | 1854 | | |
1855 | 1855 | | |
| |||
1870 | 1870 | | |
1871 | 1871 | | |
1872 | 1872 | | |
1873 | | - | |
1874 | | - | |
1875 | 1873 | | |
1876 | 1874 | | |
1877 | 1875 | | |
| |||
1883 | 1881 | | |
1884 | 1882 | | |
1885 | 1883 | | |
1886 | | - | |
1887 | | - | |
1888 | | - | |
1889 | 1884 | | |
1890 | 1885 | | |
1891 | 1886 | | |
1892 | 1887 | | |
1893 | 1888 | | |
1894 | 1889 | | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
1895 | 1893 | | |
1896 | 1894 | | |
1897 | 1895 | | |
| |||
0 commit comments