Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc6268f6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "staging: android: binder: fix binder interface for 64bit compat layer"

parents a40cfedf c7eb3fd6
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -1273,7 +1273,7 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
		case BINDER_TYPE_WEAK_HANDLE: {
			struct binder_ref *ref = binder_get_ref(proc, fp->handle);
			if (ref == NULL) {
				pr_err("transaction release %d bad handle %ld\n",
				pr_err("transaction release %d bad handle %d\n",
				 debug_id, fp->handle);
				break;
			}
@@ -1285,13 +1285,13 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,

		case BINDER_TYPE_FD:
			binder_debug(BINDER_DEBUG_TRANSACTION,
				     "        fd %ld\n", fp->handle);
				     "        fd %d\n", fp->handle);
			if (failed_at)
				task_close_fd(proc, fp->handle);
			break;

		default:
			pr_err("transaction release %d bad object type %lx\n",
			pr_err("transaction release %d bad object type %x\n",
				debug_id, fp->type);
			break;
		}
@@ -1557,7 +1557,7 @@ static void binder_transaction(struct binder_proc *proc,
		case BINDER_TYPE_WEAK_HANDLE: {
			struct binder_ref *ref = binder_get_ref(proc, fp->handle);
			if (ref == NULL) {
				binder_user_error("%d:%d got transaction with invalid handle, %ld\n",
				binder_user_error("%d:%d got transaction with invalid handle, %d\n",
						proc->pid,
						thread->pid, fp->handle);
				return_error = BR_FAILED_REPLY;
@@ -1604,13 +1604,13 @@ static void binder_transaction(struct binder_proc *proc,

			if (reply) {
				if (!(in_reply_to->flags & TF_ACCEPT_FDS)) {
					binder_user_error("%d:%d got reply with fd, %ld, but target does not allow fds\n",
					binder_user_error("%d:%d got reply with fd, %d, but target does not allow fds\n",
						proc->pid, thread->pid, fp->handle);
					return_error = BR_FAILED_REPLY;
					goto err_fd_not_allowed;
				}
			} else if (!target_node->accept_fds) {
				binder_user_error("%d:%d got transaction with fd, %ld, but target does not allow fds\n",
				binder_user_error("%d:%d got transaction with fd, %d, but target does not allow fds\n",
					proc->pid, thread->pid, fp->handle);
				return_error = BR_FAILED_REPLY;
				goto err_fd_not_allowed;
@@ -1618,7 +1618,7 @@ static void binder_transaction(struct binder_proc *proc,

			file = fget(fp->handle);
			if (file == NULL) {
				binder_user_error("%d:%d got transaction with invalid fd, %ld\n",
				binder_user_error("%d:%d got transaction with invalid fd, %d\n",
					proc->pid, thread->pid, fp->handle);
				return_error = BR_FAILED_REPLY;
				goto err_fget_failed;
@@ -1637,13 +1637,13 @@ static void binder_transaction(struct binder_proc *proc,
			task_fd_install(target_proc, target_fd, file);
			trace_binder_transaction_fd(t, fp->handle, target_fd);
			binder_debug(BINDER_DEBUG_TRANSACTION,
				     "        fd %ld -> %d\n", fp->handle, target_fd);
				     "        fd %d -> %d\n", fp->handle, target_fd);
			/* TODO: fput? */
			fp->handle = target_fd;
		} break;

		default:
			binder_user_error("%d:%d got transaction with invalid object type, %lx\n",
			binder_user_error("%d:%d got transaction with invalid object type, %x\n",
				proc->pid, thread->pid, fp->type);
			return_error = BR_FAILED_REPLY;
			goto err_bad_object_type;
@@ -2597,7 +2597,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
			goto err;
		}
		binder_debug(BINDER_DEBUG_READ_WRITE,
			     "%d:%d write %zd at %08lx, read %zd at %08lx\n",
			     "%d:%d write %zd at %016lx, read %zd at %016lx\n",
			     proc->pid, thread->pid, bwr.write_size,
			     bwr.write_buffer, bwr.read_size, bwr.read_buffer);

+6 −6
Original line number Diff line number Diff line
@@ -48,13 +48,13 @@ enum {
 */
struct flat_binder_object {
	/* 8 bytes for large_flat_header. */
	unsigned long		type;
	unsigned long		flags;
	__u32		type;
	__u32		flags;

	/* 8 bytes of data. */
	union {
		void __user	*binder;	/* local object */
		signed long	handle;		/* remote object */
		__u32	    handle;		/* remote object */
	};

	/* extra data associated with local object */
@@ -78,7 +78,7 @@ struct binder_write_read {
/* Use with BINDER_VERSION, driver fills in fields. */
struct binder_version {
	/* driver protocol version -- increment with incompatible change */
	signed long	protocol_version;
	__s32       protocol_version;
};

/* This is the current protocol version. */
@@ -119,7 +119,7 @@ struct binder_transaction_data {
	 * identifying the target and contents of the transaction.
	 */
	union {
		size_t	handle;	/* target descriptor of command transaction */
		__u32	handle;	/* target descriptor of command transaction */
		void	*ptr;	/* target descriptor of return transaction */
	} target;
	void		*cookie;	/* target object cookie */
@@ -154,7 +154,7 @@ struct binder_ptr_cookie {

struct binder_pri_desc {
	__s32 priority;
	__s32 desc;
	__u32 desc;
};

struct binder_pri_ptr_cookie {