tasklet_action() failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm trying to get a handle on a problem that is occuring inside of a
call to tasklet_action().  Can someone explain a bit about what line
404 is doing ( and the function itself ) in the following code?  It
seems that the OS is intermittently resulting in a false result on
line 404 and then executing line 405 which ultimately halts the
kernel.

Regards,
Tony


388 static void tasklet_action(struct softirq_action *a)
389 {
390         struct tasklet_struct *list;
391
392         local_irq_disable();
393         list = __get_cpu_var(tasklet_vec).list;
394         __get_cpu_var(tasklet_vec).list = NULL;
395         local_irq_enable();
396
397         while (list) {
398                 struct tasklet_struct *t = list;
399
400                 list = list->next;
401
402                 if (tasklet_trylock(t)) {
403                         if (!atomic_read(&t->count)) {
404                                 if
(!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
405                                         BUG();
406                                 t->func(t->data);
407                                 tasklet_unlock(t);
408                                 continue;
409                         }
410                         tasklet_unlock(t);
411                 }
412
413                 local_irq_disable();
414                 t->next = __get_cpu_var(tasklet_vec).list;
415                 __get_cpu_var(tasklet_vec).list = t;
416                 __raise_softirq_irqoff(TASKLET_SOFTIRQ);
417                 local_irq_enable();
418         }
419 }

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux