mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
md/raid5: fix new memory-reference bug in alloc_thread_groups.
In alloc_thread_groups, worker_groups is a pointer to an array,
not an array of pointers.
So
worker_groups[i]
is wrong. It should be
&(*worker_groups)[i]
Found-by: coverity
Fixes: 60aaf93385
Reported-by: Ben Hutchings <[email protected]>
Cc: majianpeng <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
This commit is contained in:
parent
6ce4eac1f6
commit
0c775d5208
1 changed files with 1 additions and 1 deletions
|
|
@ -5471,7 +5471,7 @@ static int alloc_thread_groups(struct r5conf *conf, int cnt,
|
|||
for (i = 0; i < *group_cnt; i++) {
|
||||
struct r5worker_group *group;
|
||||
|
||||
group = worker_groups[i];
|
||||
group = &(*worker_groups)[i];
|
||||
INIT_LIST_HEAD(&group->handle_list);
|
||||
group->conf = conf;
|
||||
group->workers = workers + i * cnt;
|
||||
|
|
|
|||
Loading…
Reference in a new issue