[CRIU] [PATCH] parasite: remove the hash table for tid_state-s
Andrew Vagin
avagin at parallels.com
Wed May 15 15:55:13 EDT 2013
On Wed, May 15, 2013 at 11:52:04PM +0400, Cyrill Gorcunov wrote:
> On Wed, May 15, 2013 at 11:38:01PM +0400, Andrey Vagin wrote:
> > @@ -633,16 +599,11 @@ static int noinline parasite_daemon(struct parasite_init_args *args)
> > {
> > struct tid_state_s *s;
> > unsigned long new_sp = 0;
> > - bool is_leader = false;
> > -
> > - s = find_thread_state(args->real);
> > - if (!s)
> > - return -ENOENT;
> > + bool is_leader = (args->id == 0);
> >
> > - if (s->real == thread_leader->real)
> > - is_leader = true;
> > + s = &tid_state[args->id];
>
> Maybe we should add some BUG_ON(args->id > tid_state array-size) here?
Yes, we can
>
> Cyrill
More information about the CRIU
mailing list