Marin Ramesa, le Tue 19 Nov 2013 07:34:23 +0100, a écrit : > Check if active_threads is NULL before calling current_task() to > avoid dereference of null pointer.
Same here. > * vm/vm_fault.c (active_threads): Check if it's NULL. > > --- > vm/vm_fault.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/vm/vm_fault.c b/vm/vm_fault.c > index 1089491..b8be122 100644 > --- a/vm/vm_fault.c > +++ b/vm/vm_fault.c > @@ -550,7 +550,8 @@ vm_fault_return_t vm_fault_page(first_object, > first_offset, > if (m->inactive) { > > vm_stat_sample(SAMPLED_PC_VM_REACTIVATION_FAULTS); > vm_stat.reactivations++; > - current_task()->reactivations++; > + if (active_threads[(0)] != NULL) > + current_task()->reactivations++; > } > > VM_PAGE_QUEUES_REMOVE(m); > -- > 1.8.1.4 > > -- Samuel Anyone who thinks UNIX is intuitive should be forced to write 5000 lines of code using nothing but vi or emacs. AAAAACK! (Discussion in comp.os.linux.misc on the intuitiveness of commands, especially Emacs.)