On Tue, Nov 19, 2013 at 09:06:05PM +0100, Marin Ramesa wrote:
> On 19.11.2013 20:42:24, Samuel Thibault wrote:
> > Marin Ramesa, le Tue 19 Nov 2013 07:34:19 +0100, a écrit :
> > > optimal_embed is initialized to a random value. Quiet the warning
> > > by initializing to zero.
> >
> > Analyzers wi
On 19.11.2013 20:49:37, Samuel Thibault wrote:
> This is a false positive: what the analyzer doesn't know is that
> pset->thread_count is number of elements in the pset->threads queue.
> I.e. actual is only ever set to 0 when the pset->threads queue is
> empty, and thus no iteration of the loop is
Marin Ramesa, le Tue 19 Nov 2013 21:06:05 +0100, a écrit :
> On 19.11.2013 20:42:24, Samuel Thibault wrote:
> > Marin Ramesa, le Tue 19 Nov 2013 07:34:19 +0100, a écrit :
> > > optimal_embed is initialized to a random value. Quiet the warning
> > > by initializing to zero.
> >
> > Analyzers will
On 19.11.2013 20:42:24, Samuel Thibault wrote:
> Marin Ramesa, le Tue 19 Nov 2013 07:34:19 +0100, a écrit :
> > optimal_embed is initialized to a random value. Quiet the warning
> > by initializing to zero.
>
> Analyzers will probably prefer that indeed.
So there is a good reason for this kind o
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(
Marin Ramesa, le Tue 19 Nov 2013 07:34:22 +0100, a écrit :
> Check is active_threads is NULL before calling current_task() to
> avoid dereference of null pointer.
Ah, the vm_stat_sample tracing macro is extra careful about
current_thread(), probably because it may be called very early during
boot,
Marin Ramesa, le Tue 19 Nov 2013 07:34:21 +0100, a écrit :
> When addr is equal to zero, array access from pointer threads
> results in a dereference of null pointer. Avoid this by checking
> if it's NULL.
This is a false positive: what the analyzer doesn't know is that
pset->thread_count is numbe
Marin Ramesa, le Tue 19 Nov 2013 07:34:19 +0100, a écrit :
> optimal_embed is initialized to a random value. Quiet the warning by
> initializing to zero.
Analyzers will probably prefer that indeed.
> * kern/slab.c (optimal_embed): Initialize to zero.
>
> ---
> kern/slab.c | 2 +-
> 1 file chang