Commit 6f46cbfb authored by Hari Kanigeri's avatar Hari Kanigeri

SYSLINK:ipc-fixes for sharedregion_get_table_info

This patch fixes the bugs in sharedregion_get_table_info
implementation. Fixed the BUG_ON call to check for
valid pointer and changed the check from (proc_count+1)
to proc_count in sharedregion_ioctl.c
Signed-off-by: default avatarHari Kanigeri <h-kanigeri2@ti.com>
Signed-off-by: default avatarArun Gopalakrishnan <arunmg@ti.com>
parent 40cbd288
......@@ -494,7 +494,7 @@ int sharedregion_get_table_info(u32 index, u16 proc_id,
u16 proc_count;
s32 retval = 0;
BUG_ON(info != NULL);
BUG_ON(info == NULL);
if (atomic_cmpmask_and_lt(&(sharedregion_state.ref_count),
SHAREDREGION_MAKE_MAGICSTAMP(0),
SHAREDREGION_MAKE_MAGICSTAMP(1)) == true) {
......
......@@ -96,7 +96,7 @@ static int sharedregion_ioctl_setup(struct sharedregion_cmd_args *cargs)
proc_count = multiproc_get_max_processors();
table = cargs->args.setup.table;
for (i = 0; i < config.max_regions; i++) {
for (j = 0; j < (proc_count + 1); j++) {
for (j = 0; j < (proc_count); j++) {
sharedregion_get_table_info(i, j, &info);
if (info.is_valid == true) {
/* Convert kernel virtual address to physical
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment