Re: 2.6.24-rc2-mm1

Zan Lynx
2007-11-14T05:45:56Z

Andrew Morton wrote:
[cut]
> hm, that was supposed to shut itself off after 100 messages:
>
> if (unlikely(clone_flags & (CLONE_DETACHED|CLONE_STOPPED))) {
> static int __read_mostly count = 100;
>
> if (count && printk_ratelimit()) {
> char comm[TASK_COMM_LEN];
>
> count--;
> printk(KERN_INFO "fork(): process `%s' used deprecated "
> "clone flags 0x%lx\n",
> get_task_comm(comm, current),
> clone_flags & (CLONE_DETACHED|CLONE_STOPPED));
> }
> }
>
> I don't see how you got 151 instances. I guess I'm having another stupid
> day.

It looks like a simple race, two threads do count-- before doing
if(count), resulting in an almost infinite loop. Probably.

atomic_test_and_dec might work.