[bug report] padata: simplify serialization mechanism

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

 



Hello Steffen Klassert,

The patch 5f1a8c1bc724: "padata: simplify serialization mechanism"
from Jul 7, 2010, leads to the following static checker warning:

	kernel/padata.c:243 padata_reorder()
	warn: 'padata' is an error pointer or valid

kernel/padata.c
   231          if (!spin_trylock_bh(&pd->lock))
   232                  return;
   233  
   234          while (1) {
   235                  padata = padata_get_next(pd);
   236  
   237                  /*
   238                   * All reorder queues are empty, or the next object that needs
   239                   * serialization is parallel processed by another cpu and is
   240                   * still on it's way to the cpu's reorder queue, nothing to
   241                   * do for now.
   242                   */
   243                  if (!padata || PTR_ERR(padata) == -EINPROGRESS)
                             ^^^^^^
The comments still say that we sometimes return NULL but we removed that
in 2010.

   244                          break;
   245  
   246                  /*
   247                   * This cpu has to do the parallel processing of the next
   248                   * object. It's waiting in the cpu's parallelization queue,
   249                   * so exit immediately.
   250                   */
   251                  if (PTR_ERR(padata) == -ENODATA) {
   252                          del_timer(&pd->timer);
   253                          spin_unlock_bh(&pd->lock);
   254                          return;
   255                  }

regards,
dan carpenter



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux