Repository navigation
Commit 005a79e
mm/slub: fix endianness bug for alloc/free_traces attributes
On big-endian s390, the alloc/free_traces attributes produce endless
output, because of always 0 idx in slab_debugfs_show().
idx is de-referenced from *v, which points to a loff_t value, with
unsigned int idx = *(unsigned int *)v;
This will only give the upper 32 bits on big-endian, which remain 0.
Instead of only fixing this de-reference, during discussion it seemed
more appropriate to change the seq_ops so that they use an explicit
iterator in private loc_track struct.
This patch adds idx to loc_track, which will also fix the endianness
bug.
Link: https://lore.kernel.org/r/20211117193932.4049412-1-gerald.schaefer@linux.ibm.com
Link: https://lkml.kernel.org/r/20211126171848.17534-1-gerald.schaefer@linux.ibm.com
Fixes: 64dd684 ("mm: slub: move sysfs slab alloc/free interfaces to debugfs")
Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Reported-by: Steffen Maier <maier@linux.ibm.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Faiyaz Mohammed <faiyazm@codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent 9ab3b0c commit 005a79e
1 file changed
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5081 | 5081 | | |
5082 | 5082 | | |
5083 | 5083 | | |
| 5084 | + | |
5084 | 5085 | | |
5085 | 5086 | | |
5086 | 5087 | | |
| |||
6052 | 6053 | | |
6053 | 6054 | | |
6054 | 6055 | | |
6055 | | - | |
6056 | | - | |
6057 | | - | |
6058 | 6056 | | |
| 6057 | + | |
| 6058 | + | |
6059 | 6059 | | |
| 6060 | + | |
6060 | 6061 | | |
6061 | 6062 | | |
6062 | 6063 | | |
| |||
6105 | 6106 | | |
6106 | 6107 | | |
6107 | 6108 | | |
6108 | | - | |
6109 | | - | |
| 6109 | + | |
6110 | 6110 | | |
6111 | | - | |
| 6111 | + | |
6112 | 6112 | | |
6113 | 6113 | | |
6114 | 6114 | | |
6115 | 6115 | | |
6116 | 6116 | | |
6117 | 6117 | | |
| 6118 | + | |
| 6119 | + | |
| 6120 | + | |
6118 | 6121 | | |
6119 | 6122 | | |
6120 | 6123 | | |
| |||
0 commit comments