Repository navigation
Commit 2e503bb
TOMOYO: Fix lockdep warning.
Currently TOMOYO holds SRCU lock upon open() and releases it upon close()
because list elements stored in the "struct tomoyo_io_buffer" instances are
accessed until close() is called. However, such SRCU usage causes lockdep to
complain about leaving the kernel with SRCU lock held.
This patch solves the warning by holding/releasing SRCU upon each
read()/write(). This patch is doing something similar to calling kfree()
without calling synchronize_srcu(), by selectively deferring kfree() by keeping
track of the "struct tomoyo_io_buffer" instances.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>1 parent 5625f2e commit 2e503bb
3 files changed
Lines changed: 276 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1820 | 1820 | | |
1821 | 1821 | | |
1822 | 1822 | | |
1823 | | - | |
1824 | | - | |
1825 | | - | |
| 1823 | + | |
1826 | 1824 | | |
1827 | 1825 | | |
1828 | 1826 | | |
| |||
1921 | 1919 | | |
1922 | 1920 | | |
1923 | 1921 | | |
1924 | | - | |
1925 | | - | |
1926 | | - | |
1927 | 1922 | | |
1928 | 1923 | | |
1929 | 1924 | | |
| |||
1932 | 1927 | | |
1933 | 1928 | | |
1934 | 1929 | | |
| 1930 | + | |
| 1931 | + | |
1935 | 1932 | | |
1936 | 1933 | | |
1937 | 1934 | | |
| |||
2000 | 1997 | | |
2001 | 1998 | | |
2002 | 1999 | | |
2003 | | - | |
2004 | | - | |
2005 | 2000 | | |
2006 | 2001 | | |
2007 | 2002 | | |
2008 | 2003 | | |
2009 | 2004 | | |
| 2005 | + | |
2010 | 2006 | | |
2011 | 2007 | | |
2012 | 2008 | | |
2013 | 2009 | | |
2014 | 2010 | | |
2015 | 2011 | | |
2016 | 2012 | | |
| 2013 | + | |
2017 | 2014 | | |
2018 | 2015 | | |
2019 | 2016 | | |
2020 | 2017 | | |
2021 | 2018 | | |
2022 | 2019 | | |
2023 | 2020 | | |
| 2021 | + | |
2024 | 2022 | | |
2025 | 2023 | | |
2026 | 2024 | | |
| |||
2071 | 2069 | | |
2072 | 2070 | | |
2073 | 2071 | | |
2074 | | - | |
2075 | | - | |
2076 | 2072 | | |
2077 | 2073 | | |
2078 | 2074 | | |
2079 | 2075 | | |
2080 | 2076 | | |
2081 | 2077 | | |
2082 | 2078 | | |
| 2079 | + | |
2083 | 2080 | | |
2084 | 2081 | | |
2085 | 2082 | | |
2086 | 2083 | | |
2087 | 2084 | | |
2088 | 2085 | | |
| 2086 | + | |
2089 | 2087 | | |
2090 | 2088 | | |
2091 | 2089 | | |
| |||
2148 | 2146 | | |
2149 | 2147 | | |
2150 | 2148 | | |
| 2149 | + | |
2151 | 2150 | | |
2152 | 2151 | | |
2153 | 2152 | | |
| |||
2157 | 2156 | | |
2158 | 2157 | | |
2159 | 2158 | | |
2160 | | - | |
2161 | | - | |
2162 | | - | |
| 2159 | + | |
2163 | 2160 | | |
2164 | 2161 | | |
2165 | 2162 | | |
2166 | | - | |
2167 | | - | |
2168 | 2163 | | |
2169 | 2164 | | |
2170 | 2165 | | |
2171 | 2166 | | |
2172 | | - | |
2173 | | - | |
2174 | | - | |
2175 | | - | |
2176 | | - | |
2177 | | - | |
2178 | | - | |
2179 | | - | |
2180 | | - | |
2181 | | - | |
2182 | | - | |
2183 | | - | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
2184 | 2171 | | |
2185 | 2172 | | |
2186 | 2173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
445 | | - | |
446 | 444 | | |
447 | 445 | | |
448 | 446 | | |
| |||
480 | 478 | | |
481 | 479 | | |
482 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
483 | 485 | | |
484 | 486 | | |
485 | 487 | | |
| |||
651 | 653 | | |
652 | 654 | | |
653 | 655 | | |
654 | | - | |
| 656 | + | |
655 | 657 | | |
656 | 658 | | |
657 | 659 | | |
| |||
0 commit comments