Loading drivers/char/adsprpc.c +23 −15 Original line number Diff line number Diff line Loading @@ -483,7 +483,7 @@ struct fastrpc_file { /* To indicate attempt has been made to allocate memory for debug_buf */ int debug_buf_alloced_attempted; /* Flag to indicate dynamic process creation status*/ bool in_process_create; enum fastrpc_process_create_state dsp_process_state; struct completion shutdown; }; Loading Loading @@ -2538,7 +2538,7 @@ static int fastrpc_mmap_remove_ssr(struct fastrpc_file *fl, int locked); static int fastrpc_init_process(struct fastrpc_file *fl, struct fastrpc_ioctl_init_attrs *uproc) { int err = 0, rh_hyp_done = 0; int err = 0, rh_hyp_done = 0, locked = 0; struct fastrpc_apps *me = &gfa; struct fastrpc_ioctl_invoke_crc ioctl; struct fastrpc_ioctl_init *init = &uproc->init; Loading @@ -2552,6 +2552,7 @@ static int fastrpc_init_process(struct fastrpc_file *fl, int unsigned_request = proc_attrs && init_flags; int cid = fl->cid; struct fastrpc_channel_ctx *chan = &me->channel[cid]; struct fastrpc_buf *init_mem; if (chan->unsigned_support && fl->dev_minor == MINOR_NUM_DEV) { Loading Loading @@ -2617,13 +2618,13 @@ static int fastrpc_init_process(struct fastrpc_file *fl, } inbuf; spin_lock(&fl->hlock); if (fl->in_process_create) { if (fl->dsp_process_state) { err = -EALREADY; pr_err("Already in create init process\n"); spin_unlock(&fl->hlock); return err; } fl->in_process_create = true; fl->dsp_process_state = PROCESS_CREATE_IS_INPROGRESS; spin_unlock(&fl->hlock); inbuf.pgid = fl->tgid; inbuf.namelen = strlen(current->comm) + 1; Loading Loading @@ -2832,20 +2833,27 @@ static int fastrpc_init_process(struct fastrpc_file *fl, fastrpc_mmap_free(mem, 0); mutex_unlock(&fl->map_mutex); } if (err) { if (!IS_ERR_OR_NULL(fl->init_mem)) { fastrpc_buf_free(fl->init_mem, 0); fl->init_mem = NULL; } } if (file) { mutex_lock(&fl->map_mutex); fastrpc_mmap_free(file, 0); mutex_unlock(&fl->map_mutex); } if (init->flags == FASTRPC_INIT_CREATE) { spin_lock(&fl->hlock); fl->in_process_create = false; locked = 1; if (err) { fl->dsp_process_state = PROCESS_CREATE_DEFAULT; if (!IS_ERR_OR_NULL(fl->init_mem)) { init_mem = fl->init_mem; fl->init_mem = NULL; locked = 0; spin_unlock(&fl->hlock); fastrpc_buf_free(init_mem, 0); } } else { fl->dsp_process_state = PROCESS_CREATE_SUCCESS; } if (locked) { locked = 0; spin_unlock(&fl->hlock); } return err; Loading Loading @@ -3811,7 +3819,7 @@ static int fastrpc_file_free(struct fastrpc_file *fl) } spin_lock(&fl->hlock); fl->file_close = 1; fl->in_process_create = false; fl->dsp_process_state = PROCESS_CREATE_DEFAULT; spin_unlock(&fl->hlock); if (!IS_ERR_OR_NULL(fl->init_mem)) fastrpc_buf_free(fl->init_mem, 0); Loading Loading @@ -4213,7 +4221,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) fl->cid = -1; fl->dev_minor = dev_minor; fl->init_mem = NULL; fl->in_process_create = false; fl->dsp_process_state = PROCESS_CREATE_DEFAULT; memset(&fl->perf, 0, sizeof(fl->perf)); fl->qos_request = 0; fl->dsp_proc_init = 0; Loading drivers/char/adsprpc_shared.h +9 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,15 @@ struct smq_invoke_rsp { int retval; /* invoke return value */ }; enum fastrpc_process_create_state { /* Process is not created */ PROCESS_CREATE_DEFAULT = 0, /* Process creation is in progress */ PROCESS_CREATE_IS_INPROGRESS = 1, /* Process creation is successful */ PROCESS_CREATE_SUCCESS = 2, }; enum fastrpc_response_flags { NORMAL_RESPONSE = 0, EARLY_RESPONSE = 1, Loading drivers/media/platform/msm/synx/synx_debugfs.c +2 −2 Original line number Diff line number Diff line Loading @@ -67,14 +67,14 @@ static ssize_t synx_table_read(struct file *file, if (columns & STATE_COLUMN) cur += scnprintf(cur, end - cur, "| Status |"); cur += scnprintf(cur, end - cur, "\n"); for (i = 0; i < SYNX_MAX_OBJS; i++) { for (i = 1; i < SYNX_MAX_OBJS; i++) { row = &dev->synx_table[i]; index = row->index; mutex_lock(&dev->row_locks[index]); if (!row->index) { mutex_unlock(&dev->row_locks[index]); pr_warn("synx obj at %d invalid\n", index); pr_debug("synx obj at %d invalid\n", index); continue; } Loading drivers/media/platform/msm/synx/synx_util.c +4 −2 Original line number Diff line number Diff line Loading @@ -252,7 +252,9 @@ int synx_deinit_object(struct synx_table_row *row) } } mutex_lock(&synx_dev->row_locks[index]); memset(row, 0, sizeof(*row)); mutex_unlock(&synx_dev->row_locks[index]); clear_bit(index, synx_dev->bitmap); pr_debug("destroying synx obj at %d successful\n", index); Loading Loading @@ -592,7 +594,7 @@ void *synx_from_handle(s32 synx_obj) return NULL; } base = current->tgid << 16; base = (current->tgid << 16) & 0x7FFFFFFF; if ((base >> 16) != (synx_obj >> 16)) { pr_err("current client: %d, base: %d, synx_obj: 0x%x\n", Loading @@ -619,7 +621,7 @@ void synx_release_handle(void *pObj) s32 synx_create_handle(void *pObj) { s32 base = current->tgid << 16; s32 base = (current->tgid << 16) & 0x7FFFFFFF; s32 id; struct synx_handle_entry *entry; unsigned long flags; Loading drivers/net/usb/Makefile +2 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,8 @@ obj-$(CONFIG_USB_HSO) += hso.o obj-$(CONFIG_USB_LAN78XX) += lan78xx.o obj-$(CONFIG_USB_NET_AX8817X) += asix.o asix-y := asix_devices.o asix_common.o ax88172a.o obj-$(CONFIG_USB_NET_AX88179_178A) += ax88179_178a.o obj-$(CONFIG_USB_NET_AX88179_178A) += ax_usb_nic.o ax_usb_nic-y := ax_main.o ax88179_178a.o ax88179a_772d.o obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o obj-$(CONFIG_USB_NET_CDC_EEM) += cdc_eem.o obj-$(CONFIG_USB_NET_DM9601) += dm9601.o Loading Loading
drivers/char/adsprpc.c +23 −15 Original line number Diff line number Diff line Loading @@ -483,7 +483,7 @@ struct fastrpc_file { /* To indicate attempt has been made to allocate memory for debug_buf */ int debug_buf_alloced_attempted; /* Flag to indicate dynamic process creation status*/ bool in_process_create; enum fastrpc_process_create_state dsp_process_state; struct completion shutdown; }; Loading Loading @@ -2538,7 +2538,7 @@ static int fastrpc_mmap_remove_ssr(struct fastrpc_file *fl, int locked); static int fastrpc_init_process(struct fastrpc_file *fl, struct fastrpc_ioctl_init_attrs *uproc) { int err = 0, rh_hyp_done = 0; int err = 0, rh_hyp_done = 0, locked = 0; struct fastrpc_apps *me = &gfa; struct fastrpc_ioctl_invoke_crc ioctl; struct fastrpc_ioctl_init *init = &uproc->init; Loading @@ -2552,6 +2552,7 @@ static int fastrpc_init_process(struct fastrpc_file *fl, int unsigned_request = proc_attrs && init_flags; int cid = fl->cid; struct fastrpc_channel_ctx *chan = &me->channel[cid]; struct fastrpc_buf *init_mem; if (chan->unsigned_support && fl->dev_minor == MINOR_NUM_DEV) { Loading Loading @@ -2617,13 +2618,13 @@ static int fastrpc_init_process(struct fastrpc_file *fl, } inbuf; spin_lock(&fl->hlock); if (fl->in_process_create) { if (fl->dsp_process_state) { err = -EALREADY; pr_err("Already in create init process\n"); spin_unlock(&fl->hlock); return err; } fl->in_process_create = true; fl->dsp_process_state = PROCESS_CREATE_IS_INPROGRESS; spin_unlock(&fl->hlock); inbuf.pgid = fl->tgid; inbuf.namelen = strlen(current->comm) + 1; Loading Loading @@ -2832,20 +2833,27 @@ static int fastrpc_init_process(struct fastrpc_file *fl, fastrpc_mmap_free(mem, 0); mutex_unlock(&fl->map_mutex); } if (err) { if (!IS_ERR_OR_NULL(fl->init_mem)) { fastrpc_buf_free(fl->init_mem, 0); fl->init_mem = NULL; } } if (file) { mutex_lock(&fl->map_mutex); fastrpc_mmap_free(file, 0); mutex_unlock(&fl->map_mutex); } if (init->flags == FASTRPC_INIT_CREATE) { spin_lock(&fl->hlock); fl->in_process_create = false; locked = 1; if (err) { fl->dsp_process_state = PROCESS_CREATE_DEFAULT; if (!IS_ERR_OR_NULL(fl->init_mem)) { init_mem = fl->init_mem; fl->init_mem = NULL; locked = 0; spin_unlock(&fl->hlock); fastrpc_buf_free(init_mem, 0); } } else { fl->dsp_process_state = PROCESS_CREATE_SUCCESS; } if (locked) { locked = 0; spin_unlock(&fl->hlock); } return err; Loading Loading @@ -3811,7 +3819,7 @@ static int fastrpc_file_free(struct fastrpc_file *fl) } spin_lock(&fl->hlock); fl->file_close = 1; fl->in_process_create = false; fl->dsp_process_state = PROCESS_CREATE_DEFAULT; spin_unlock(&fl->hlock); if (!IS_ERR_OR_NULL(fl->init_mem)) fastrpc_buf_free(fl->init_mem, 0); Loading Loading @@ -4213,7 +4221,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) fl->cid = -1; fl->dev_minor = dev_minor; fl->init_mem = NULL; fl->in_process_create = false; fl->dsp_process_state = PROCESS_CREATE_DEFAULT; memset(&fl->perf, 0, sizeof(fl->perf)); fl->qos_request = 0; fl->dsp_proc_init = 0; Loading
drivers/char/adsprpc_shared.h +9 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,15 @@ struct smq_invoke_rsp { int retval; /* invoke return value */ }; enum fastrpc_process_create_state { /* Process is not created */ PROCESS_CREATE_DEFAULT = 0, /* Process creation is in progress */ PROCESS_CREATE_IS_INPROGRESS = 1, /* Process creation is successful */ PROCESS_CREATE_SUCCESS = 2, }; enum fastrpc_response_flags { NORMAL_RESPONSE = 0, EARLY_RESPONSE = 1, Loading
drivers/media/platform/msm/synx/synx_debugfs.c +2 −2 Original line number Diff line number Diff line Loading @@ -67,14 +67,14 @@ static ssize_t synx_table_read(struct file *file, if (columns & STATE_COLUMN) cur += scnprintf(cur, end - cur, "| Status |"); cur += scnprintf(cur, end - cur, "\n"); for (i = 0; i < SYNX_MAX_OBJS; i++) { for (i = 1; i < SYNX_MAX_OBJS; i++) { row = &dev->synx_table[i]; index = row->index; mutex_lock(&dev->row_locks[index]); if (!row->index) { mutex_unlock(&dev->row_locks[index]); pr_warn("synx obj at %d invalid\n", index); pr_debug("synx obj at %d invalid\n", index); continue; } Loading
drivers/media/platform/msm/synx/synx_util.c +4 −2 Original line number Diff line number Diff line Loading @@ -252,7 +252,9 @@ int synx_deinit_object(struct synx_table_row *row) } } mutex_lock(&synx_dev->row_locks[index]); memset(row, 0, sizeof(*row)); mutex_unlock(&synx_dev->row_locks[index]); clear_bit(index, synx_dev->bitmap); pr_debug("destroying synx obj at %d successful\n", index); Loading Loading @@ -592,7 +594,7 @@ void *synx_from_handle(s32 synx_obj) return NULL; } base = current->tgid << 16; base = (current->tgid << 16) & 0x7FFFFFFF; if ((base >> 16) != (synx_obj >> 16)) { pr_err("current client: %d, base: %d, synx_obj: 0x%x\n", Loading @@ -619,7 +621,7 @@ void synx_release_handle(void *pObj) s32 synx_create_handle(void *pObj) { s32 base = current->tgid << 16; s32 base = (current->tgid << 16) & 0x7FFFFFFF; s32 id; struct synx_handle_entry *entry; unsigned long flags; Loading
drivers/net/usb/Makefile +2 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,8 @@ obj-$(CONFIG_USB_HSO) += hso.o obj-$(CONFIG_USB_LAN78XX) += lan78xx.o obj-$(CONFIG_USB_NET_AX8817X) += asix.o asix-y := asix_devices.o asix_common.o ax88172a.o obj-$(CONFIG_USB_NET_AX88179_178A) += ax88179_178a.o obj-$(CONFIG_USB_NET_AX88179_178A) += ax_usb_nic.o ax_usb_nic-y := ax_main.o ax88179_178a.o ax88179a_772d.o obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o obj-$(CONFIG_USB_NET_CDC_EEM) += cdc_eem.o obj-$(CONFIG_USB_NET_DM9601) += dm9601.o Loading