> -Original Message-
> From: Min Hu (Connor)
> > Another suggestion if you would like to improve the code, is below,
> > You can move "global_fds[lcore_id]" check to immediate after the line
> "fds.fd = global_fds[lcore_id]; "
> Hi, thanks Pattan.
> But I think "global_fds[lcore_id]"
Any comment please?
29/04/2021 02:43, Min Hu (Connor):
>
> 在 2021/4/28 23:13, Pattan, Reshma 写道:
> >
> >
> >> -Original Message-
> >> From: dev On Behalf Of Min Hu (Connor)
> >>
> >> + if (lcore_id >= RTE_MAX_LCORE) {
> >> + RTE_LOG(ERR, GUEST_CHANNEL, "Channel(%u) is out of
在 2021/4/28 23:13, Pattan, Reshma 写道:
-Original Message-
From: dev On Behalf Of Min Hu (Connor)
+ if (lcore_id >= RTE_MAX_LCORE) {
+ RTE_LOG(ERR, GUEST_CHANNEL, "Channel(%u) is out of range
0...%d\n",
+ lcore_id, RTE_MAX_LCORE-1);
> -Original Message-
> From: dev On Behalf Of Min Hu (Connor)
>
> + if (lcore_id >= RTE_MAX_LCORE) {
> + RTE_LOG(ERR, GUEST_CHANNEL, "Channel(%u) is out of range
> 0...%d\n",
> + lcore_id, RTE_MAX_LCORE-1);
> + return -1;
> +
From: HongBo Zheng
In function power_guest_channel_read_msg, 'lcore_id' is used before
validity check, which may cause buffer 'global_fds' accessed by index
'lcore_id' overflow.
This patch moves the validity check of 'lcore_id' before the 'lcore_id'
being used for the first time.
Fixes: 9dc843e
5 matches
Mail list logo