[bug report] binder: guarantee txn complete / errors delivered in-order

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

 



Hello Todd Kjos,

The patch 26549d177410: "binder: guarantee txn complete / errors
delivered in-order" from Jun 29, 2017, leads to the following static
checker warning:

	drivers/android/binder.c:3622 binder_thread_read()
	error: uninitialized symbol 'cmd'.

drivers/android/binder.c
  3611                  case BINDER_WORK_RETURN_ERROR: {
  3612                          struct binder_error *e = container_of(
  3613                                          w, struct binder_error, work);
  3614  
  3615                          WARN_ON(e->cmd == BR_OK);
  3616                          binder_inner_proc_unlock(proc);
  3617                          if (put_user(e->cmd, (uint32_t __user *)ptr))
  3618                                  return -EFAULT;
  3619                          e->cmd = BR_OK;
  3620                          ptr += sizeof(uint32_t);
  3621  
  3622                          binder_stat_br(proc, thread, cmd);
                                                             ^^^

Uninitialized.  Probably e->cmd was intended?

  3623                  } break;
  3624                  case BINDER_WORK_TRANSACTION_COMPLETE: {
  3625                          binder_inner_proc_unlock(proc);
  3626                          cmd = BR_TRANSACTION_COMPLETE;
  3627                          if (put_user(cmd, (uint32_t __user *)ptr))
  3628                                  return -EFAULT;

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux