Mitsuo Hayasaka <mitsuo.hayasaka.hu <at> hitachi.com> writes: > > The /proc/vmallocinfo shows information about vmalloc allocations in vmlist > that is a linklist of vm_struct. It, however, may access pages field of > vm_struct where a page was not allocated. This results in a null pointer > access and leads to a kernel panic. > +static void insert_vmalloc_vmlist(struct vm_struct *vm) > +{ > + struct vm_struct *tmp, **p; > > + vm->flags &= ~VM_UNLIST; > write_lock(&vmlist_lock); > for (p = &vmlist; (tmp = *p) != NULL; p = &tmp->next) { > if (tmp->addr >= vm->addr) > @@ -1275,6 +1279,13 @@ static void insert_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, > write_unlock(&vmlist_lock); > } Hi Mitsuo: Is it needed to set the VM_UNLIST after vm_struct added to vmlist here? or put it into lock protection? Thanks -Wanlong Gao -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>