Commit 35781a8c authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

util: Drop redundant vma_area->vma.status assignment

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
parent 3542220a
...@@ -50,6 +50,7 @@ struct pipe_entry { ...@@ -50,6 +50,7 @@ struct pipe_entry {
u8 data[0]; u8 data[0];
} __packed; } __packed;
#define VMA_AREA_NONE (0 << 0)
#define VMA_AREA_REGULAR (1 << 0) /* Dumpable area */ #define VMA_AREA_REGULAR (1 << 0) /* Dumpable area */
#define VMA_AREA_STACK (1 << 1) #define VMA_AREA_STACK (1 << 1)
#define VMA_AREA_VSYSCALL (1 << 2) #define VMA_AREA_VSYSCALL (1 << 2)
......
...@@ -135,6 +135,7 @@ void printk_vma(struct vma_area *vma_area); ...@@ -135,6 +135,7 @@ void printk_vma(struct vma_area *vma_area);
pr_info_vma(vma); \ pr_info_vma(vma); \
} while (0) } while (0)
/* Note while VMA_AREA_NONE we rely on xzalloc */
#define alloc_vma_area() \ #define alloc_vma_area() \
({ \ ({ \
struct vma_area *p__ = xzalloc(sizeof(*p__)); \ struct vma_area *p__ = xzalloc(sizeof(*p__)); \
......
...@@ -327,8 +327,6 @@ int parse_maps(pid_t pid, struct list_head *vma_area_list, bool use_map_files) ...@@ -327,8 +327,6 @@ int parse_maps(pid_t pid, struct list_head *vma_area_list, bool use_map_files)
else if (s == 'p') else if (s == 'p')
vma_area->vma.flags = MAP_PRIVATE; vma_area->vma.flags = MAP_PRIVATE;
vma_area->vma.status = 0;
if (strstr(big_buffer, "[stack]")) { if (strstr(big_buffer, "[stack]")) {
vma_area->vma.status |= VMA_AREA_REGULAR | VMA_AREA_STACK; vma_area->vma.status |= VMA_AREA_REGULAR | VMA_AREA_STACK;
vma_area->vma.prot |= PROT_GROWSDOWN; vma_area->vma.prot |= PROT_GROWSDOWN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment