Commit 09c4656
codetag: debug: introduce OBJEXTS_ALLOC_FAIL to mark failed slab_ext allocations
If slabobj_ext vector allocation for a slab object fails and later on it
succeeds for another object in the same slab, the slabobj_ext for the
original object will be NULL and will be flagged in case when
CONFIG_MEM_ALLOC_PROFILING_DEBUG is enabled.
Mark failed slabobj_ext vector allocations using a new objext_flags flag
stored in the lower bits of slab->obj_exts. When new allocation succeeds
it marks all tag references in the same slabobj_ext vector as empty to
avoid warnings implemented by CONFIG_MEM_ALLOC_PROFILING_DEBUG checks.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Suren Baghdasaryan <[email protected]>
Tested-by: Kees Cook <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Alex Gaynor <[email protected]>
Cc: Alice Ryhl <[email protected]>
Cc: Andreas Hindborg <[email protected]>
Cc: Benno Lossin <[email protected]>
Cc: "Björn Roy Baron" <[email protected]>
Cc: Boqun Feng <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Dennis Zhou <[email protected]>
Cc: Gary Guo <[email protected]>
Cc: Kent Overstreet <[email protected]>
Cc: Miguel Ojeda <[email protected]>
Cc: Pasha Tatashin <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Wedson Almeida Filho <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent d224eb0 commit 09c4656
2 files changed
+42
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
369 | 371 | | |
370 | | - | |
| 372 | + | |
371 | 373 | | |
372 | 374 | | |
373 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1891 | 1891 | | |
1892 | 1892 | | |
1893 | 1893 | | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
1894 | 1915 | | |
1895 | 1916 | | |
1896 | 1917 | | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
1897 | 1921 | | |
1898 | 1922 | | |
1899 | 1923 | | |
| |||
1909 | 1933 | | |
1910 | 1934 | | |
1911 | 1935 | | |
1912 | | - | |
1913 | | - | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
1914 | 1939 | | |
1915 | 1940 | | |
1916 | 1941 | | |
1917 | 1942 | | |
1918 | 1943 | | |
1919 | 1944 | | |
1920 | | - | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
1921 | 1950 | | |
| 1951 | + | |
1922 | 1952 | | |
1923 | | - | |
| 1953 | + | |
1924 | 1954 | | |
1925 | | - | |
| 1955 | + | |
1926 | 1956 | | |
| 1957 | + | |
| 1958 | + | |
1927 | 1959 | | |
1928 | 1960 | | |
1929 | 1961 | | |
1930 | 1962 | | |
1931 | 1963 | | |
1932 | 1964 | | |
1933 | | - | |
1934 | | - | |
| 1965 | + | |
| 1966 | + | |
1935 | 1967 | | |
1936 | 1968 | | |
1937 | 1969 | | |
| |||
0 commit comments