From: Pavel Skripkin <hidden> Date: 2021-11-13 22:43:25
On 11/14/21 01:36, Pavel Skripkin wrote:
Smatch says:
bnx2x_init_ops.h:640 bnx2x_ilt_client_mem_op()
warn: variable dereferenced before check 'ilt' (see line 638)
Move ilt_cli variable initialization _after_ ilt validation, because
it's unsafe to deref the pointer before validation check.
Fixes: 523224a3b3cd ("bnx2x, cnic, bnx2i: use new FW/HSI")
Signed-off-by: Pavel Skripkin <redacted>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Btw, looks like GR-everest-linux-l2@marvell.com doesn't exist anymore.
It's listed in 2 MAINTAINERS entries. Should it be removed from
MAINTAINERS file?
Quoting private email from postmaster@marvel.com:
Delivery has failed to these recipients or groups:
gr-everest-linux-l2@marvell.com<mailto:gr-everest-linux-l2@marvell.com>
The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk.
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller [off-list ref]:
On Sun, 14 Nov 2021 01:36:36 +0300 you wrote:
Smatch says:
bnx2x_init_ops.h:640 bnx2x_ilt_client_mem_op()
warn: variable dereferenced before check 'ilt' (see line 638)
Move ilt_cli variable initialization _after_ ilt validation, because
it's unsafe to deref the pointer before validation check.
[...]
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-11-15 14:13:21
On Sun, 14 Nov 2021 01:41:59 +0300 Pavel Skripkin wrote:
Btw, looks like GR-everest-linux-l2@marvell.com doesn't exist anymore.
It's listed in 2 MAINTAINERS entries. Should it be removed from
MAINTAINERS file?
Yes, if it bounces it should be removed. Can you send a patch?
From: Pavel Skripkin <hidden> Date: 2021-11-15 21:18:35
I've sent a patch to GR-everest-linux-l2@marvell.com few days ago and
got a reply from postmaster@marvell.com:
Delivery has failed to these recipients or groups:
gr-everest-linux-l2@marvell.com<mailto:gr-everest-linux-l2@marvell.com>
The email address you entered couldn't be found. Please check the
recipient's email address and try to resend the message. If the problem
continues, please contact your helpdesk.
Since this email bounces, let's remove it from MAINTAINERS file.
Signed-off-by: Pavel Skripkin <redacted>
---
CCed others related maintainers from marvell, maybe they know what
happened with this email
---
MAINTAINERS | 2 --
1 file changed, 2 deletions(-)
I've sent a patch to GR-everest-linux-l2@marvell.com few days ago and
got a reply from postmaster@marvell.com:
Delivery has failed to these recipients or groups:
gr-everest-linux-l2@marvell.com<mailto:gr-everest-linux-l2@marvell.com>
The email address you entered couldn't be found. Please check the
recipient's email address and try to resend the message. If the problem
continues, please contact your helpdesk.
Since this email bounces, let's remove it from MAINTAINERS file.
Signed-off-by: Pavel Skripkin <redacted>
---
CCed others related maintainers from marvell, maybe they know what
happened with this email
Pavel,
Yes gr-everest-linux-l2@marvell.com has been disabled, But please
add Manish Chopra [off-list ref] to the maintainer list.
Thanks,
Alok
From: Pavel Skripkin <hidden> Date: 2021-11-16 14:13:34
I've sent a patch to GR-everest-linux-l2@marvell.com few days ago and
got a reply from postmaster@marvell.com:
Delivery has failed to these recipients or groups:
gr-everest-linux-l2@marvell.com<mailto:gr-everest-linux-l2@marvell.com>
The email address you entered couldn't be found. Please check the
recipient's email address and try to resend the message. If the problem
continues, please contact your helpdesk.
As requested by Alok Prasad, replacing GR-everest-linux-l2@marvell.com
with Manish Chopra's email address. [0]
Link: https://lore.kernel.org/all/20211116081601.11208-1-palok@marvell.com/ [0]
Signed-off-by: Pavel Skripkin <redacted>
---
Changes in v2:
Replaced GR-everest-linux-l2@marvell.com with Manish Chopra's email, as
requested by Alok.
---
MAINTAINERS | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski [off-list ref]:
On Tue, 16 Nov 2021 17:13:03 +0300 you wrote:
I've sent a patch to GR-everest-linux-l2@marvell.com few days ago and
got a reply from postmaster@marvell.com:
Delivery has failed to these recipients or groups:
gr-everest-linux-l2@marvell.com<mailto:gr-everest-linux-l2@marvell.com>
The email address you entered couldn't be found. Please check the
recipient's email address and try to resend the message. If the problem
continues, please contact your helpdesk.
[...]
From: Johan Hovold <johan@kernel.org> Date: 2021-11-18 08:53:00
[ Adding Dan. ]
On Sun, Nov 14, 2021 at 01:36:36AM +0300, Pavel Skripkin wrote:
Smatch says:
bnx2x_init_ops.h:640 bnx2x_ilt_client_mem_op()
warn: variable dereferenced before check 'ilt' (see line 638)
Move ilt_cli variable initialization _after_ ilt validation, because
it's unsafe to deref the pointer before validation check.
It seems smatch is confused here. There is no dereference happening
until after the check, we're just determining the address when
initialising ilt_cli.
I know this has been applied, and the change itself is fine, but the
patch description is wrong and the Fixes tag is unwarranted.
quoted hunk
Fixes: 523224a3b3cd ("bnx2x, cnic, bnx2i: use new FW/HSI")
Signed-off-by: Pavel Skripkin <redacted>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: Pavel Skripkin <hidden> Date: 2021-11-18 09:01:14
On 11/18/21 11:51, Johan Hovold wrote:
[ Adding Dan. ]
On Sun, Nov 14, 2021 at 01:36:36AM +0300, Pavel Skripkin wrote:
quoted
Smatch says:
bnx2x_init_ops.h:640 bnx2x_ilt_client_mem_op()
warn: variable dereferenced before check 'ilt' (see line 638)
Move ilt_cli variable initialization _after_ ilt validation, because
it's unsafe to deref the pointer before validation check.
It seems smatch is confused here. There is no dereference happening
until after the check, we're just determining the address when
initialising ilt_cli.
I know this has been applied, and the change itself is fine, but the
patch description is wrong and the Fixes tag is unwarranted.
I agree. I came up with same thing after the patch has been applied. I
thought about a revert, but seems it's not necessary, since there is no
function change.
I should check smatch warnings more carefully next time, can't say why I
didn't notice it before sending :(
thanks
With regards,
Pavel Skripkin
From: Dan Carpenter <hidden> Date: 2021-11-18 15:10:24
On Thu, Nov 18, 2021 at 09:51:57AM +0100, Johan Hovold wrote:
[ Adding Dan. ]
On Sun, Nov 14, 2021 at 01:36:36AM +0300, Pavel Skripkin wrote:
quoted
Smatch says:
bnx2x_init_ops.h:640 bnx2x_ilt_client_mem_op()
warn: variable dereferenced before check 'ilt' (see line 638)
Move ilt_cli variable initialization _after_ ilt validation, because
it's unsafe to deref the pointer before validation check.
It seems smatch is confused here. There is no dereference happening
until after the check, we're just determining the address when
initialising ilt_cli.
Yep. You're right. I will fix this. I've written a fix and I'll test
it tonight.
regards,
dan carpenter