diff options
author | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-05-27 04:14:59 +0800 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-06-18 12:10:53 +0800 |
commit | 43d86ec93630396b622acf3f9cb88f734d4098e8 (patch) | |
tree | 4b8a585b5af1d72fb5c7a3594da36f78ef3c18c8 /fs/erofs | |
parent | 7674a42f35ea302b97ff3659f2e6f28be23ac9b9 (diff) |
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 <hsiangkao@linux.alibaba.com>
Reviewed-by: Yue Hu <huyue2@coolpad.com>
Link: https://lore.kernel.org/r/20230526201459.128169-7-hsiangkao@linux.alibaba.com
Diffstat (limited to 'fs/erofs')
-rw-r--r-- | fs/erofs/zdata.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 637a964ff110..264bf553c287 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -91,10 +91,8 @@ struct z_erofs_pcluster { struct z_erofs_bvec compressed_bvecs[]; }; -/* let's avoid the valid 32-bit kernel addresses */ - /* the end of a chain of pclusters */ -#define Z_EROFS_PCLUSTER_TAIL ((void *)0x5F0ECAFE) +#define Z_EROFS_PCLUSTER_TAIL ((void *) 0x700 + POISON_POINTER_DELTA) #define Z_EROFS_PCLUSTER_NIL (NULL) struct z_erofs_decompressqueue { |