Ver código fonte

Revert "msm: adsprpc: Fail set session info on subsequent calls"

This reverts commit e72afbb1efa6d538181fcb5ef5283bea6d466b46.

Change-Id: Ie0b1e84d2306456ae66c41a811f3a43b1ff2d4de
Signed-off-by: Linux Image Build Automation <[email protected]>
Linux Image Build Automation 1 ano atrás
pai
commit
32d85c1e83
2 arquivos alterados com 2 adições e 19 exclusões
  1. 2 17
      dsp/adsprpc.c
  2. 0 2
      dsp/adsprpc_shared.h

+ 2 - 17
dsp/adsprpc.c

@@ -3547,11 +3547,6 @@ static int fastrpc_set_session_info(
 	int err = 0;
 	struct fastrpc_apps *me = &gfa;
 
-	if (fl->set_session_info) {
-		ADSPRPC_ERR("Set session info invoked multiple times\n");
-		err = -EBADR;
-		goto bail;
-	}
 	/*
 	 * Third-party apps don't have permission to open the fastrpc device, so
 	 * it is opened on their behalf by DSP HAL. This is detected by
@@ -5823,8 +5818,9 @@ skip_dump_wait:
 	fl->is_ramdump_pend = false;
 	fl->is_dma_invoke_pend = false;
 	fl->dsp_process_state = PROCESS_CREATE_DEFAULT;
+	VERIFY(err, VALID_FASTRPC_CID(cid));
 	/* Reset the tgid usage to false */
-	if (VALID_FASTRPC_CID(cid) && fl->tgid_frpc != -1)
+	if (!err)
 		frpc_tgid_usage_array[cid][fl->tgid_frpc] = false;
 	is_locked = false;
 	spin_unlock_irqrestore(&fl->apps->hlock, irq_flags);
@@ -6289,7 +6285,6 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp)
 	fl->exit_notif = false;
 	fl->exit_async = false;
 	fl->multi_session_support = false;
-	fl->set_session_info = false;
 	init_completion(&fl->work);
 	init_completion(&fl->dma_invoke);
 	fl->file_close = FASTRPC_PROCESS_DEFAULT_STATE;
@@ -6435,16 +6430,6 @@ int fastrpc_get_info(struct fastrpc_file *fl, uint32_t *info)
 		err = -EBADF;
 		goto bail;
 	}
-	spin_lock(&fl->hlock);
-	if (fl->set_session_info) {
-		spin_unlock(&fl->hlock);
-		ADSPRPC_ERR("Set session info invoked multiple times\n");
-		err = -EBADR;
-		goto bail;
-	}
-	// Set set_session_info to true
-	fl->set_session_info = true;
-	spin_unlock(&fl->hlock);
 	VERIFY(err, VALID_FASTRPC_CID(cid));
 	if (err) {
 		err = -ECHRNG;

+ 0 - 2
dsp/adsprpc_shared.h

@@ -923,8 +923,6 @@ struct fastrpc_file {
 	struct fastrpc_proc_sharedbuf_info sharedbuf_info;
 	/* Flag to indicate 4 session support available */
 	bool multi_session_support;
-	/* Flag to indicate session info is set */
-	bool set_session_info;
 };
 
 int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,