Skip to content

Commit 43d86ec

Browse files
committed
erofs: use poison pointer to replace the hard-coded address
It's safer and cleaner to replace such hard-coded illegal pointer with poison pointers. Signed-off-by: Gao Xiang <[email protected]> Reviewed-by: Yue Hu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7674a42 commit 43d86ec

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/erofs/zdata.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,8 @@ struct z_erofs_pcluster {
9191
struct z_erofs_bvec compressed_bvecs[];
9292
};
9393

94-
/* let's avoid the valid 32-bit kernel addresses */
95-
9694
/* the end of a chain of pclusters */
97-
#define Z_EROFS_PCLUSTER_TAIL ((void *)0x5F0ECAFE)
95+
#define Z_EROFS_PCLUSTER_TAIL ((void *) 0x700 + POISON_POINTER_DELTA)
9896
#define Z_EROFS_PCLUSTER_NIL (NULL)
9997

10098
struct z_erofs_decompressqueue {

0 commit comments

Comments
 (0)