raw/ifpga: fix fd leak in rte fpga do pr
PATCH 1/1 raw/ifpga: fix fd leak in rte fpga do pr
In rte_fpga_do_pr() function, if 'stat' returns error, rte_fpga_do_pr() returns -EINVAL without closing the 'file_fd' that has been opened.
After this patch, 'file_fd' is closed before rte_fpga_do_pr() returns -EINVAL when 'stat' returns error
---
--- drivers/raw/ifpga_rawdev/ifpga_rawdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/raw/ifpga_rawdev/ifpga_rawdev.c +2 -1
@@ -244,7 +244,8 @@if (ret) {IFPGA_RAWDEV_PMD_ERR ("stat on bitstream file failed: %s\n" , file_name); -return -EINVAL ; + ret = -EINVAL ; + goto close_fd; } buffer_size = file_stat.st_size;IFPGA_RAWDEV_PMD_INFO ("bitstream file size: %zu\n" , buffer_size);
Signature · 1 line
1.8.3.1
Hi,
Quoted 8 lines
-----Original Message-----
From: Pei, Andy
Sent: Wednesday, April 17, 2019 14:49
To: [email protected]
Cc: Pei, Andy <[email protected]>; Xu, Rosen <[email protected]>; Kovacevic, Marko <[email protected]>; [email protected]; [email protected]
Subject: [PATCH] raw/ifpga: fix fd leak in rte fpga do pr
Pls use raw/ifpga_rawdev prefix.
I suggest you to run ./devtools/check-git-log.sh -1 before you sending patch.
Quoted 5 lines
In
rte_fpga_do_pr()function, if 'stat' returns error,rte_fpga_do_pr()returns-EINVALwithout closing the 'file_fd' that has been opened.
After this patch, 'file_fd' is closed beforerte_fpga_do_pr()returns-EINVALwhen 'stat' returns error
Pls put this in the commit message:
Coverity issue: 279441
Quoted 31 lines
Fixes ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")Signed-off-by Andy Pei <[email protected]>---
--- drivers/raw/ifpga_rawdev/ifpga_rawdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/raw/ifpga_rawdev/ifpga_rawdev.c +2
-1@@ -244,7 +244,8 @@if (ret) {IFPGA_RAWDEV_PMD_ERR ("stat on bitstream file failed: %s\n", file_name); -return -EINVAL ; + ret = -EINVAL ; + goto close_fd; } buffer_size = file_stat.st_size;
IFPGA_RAWDEV_PMD_INFO("bitstream file size: %zu\n", buffer_size);
--
1.8.3.1
Okay
-----Original Message-----
From: Xu, Rosen
Sent: Wednesday, April 17, 2019 3:14 PM
To: Pei, Andy <[email protected]>; [email protected]
Cc: Kovacevic, Marko <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH] raw/ifpga: fix fd leak in rte fpga do pr
Hi,
Quoted 8 lines
-----Original Message-----
From: Pei, Andy
Sent: Wednesday, April 17, 2019 14:49
To: [email protected]
Cc: Pei, Andy <[email protected]>; Xu, Rosen <[email protected]>; Kovacevic, Marko <[email protected]>; [email protected]; [email protected]
Subject: [PATCH] raw/ifpga: fix fd leak in rte fpga do pr
Pls use raw/ifpga_rawdev prefix.
I suggest you to run ./devtools/check-git-log.sh -1 before you sending patch.
Quoted 5 lines
In
rte_fpga_do_pr()function, if 'stat' returns error,rte_fpga_do_pr()returns-EINVALwithout closing the 'file_fd' that has been opened.
After this patch, 'file_fd' is closed beforerte_fpga_do_pr()returns-EINVALwhen 'stat' returns error
Pls put this in the commit message:
Coverity issue: 279441
Quoted 31 lines
Fixes ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")Signed-off-by Andy Pei <[email protected]>---
--- drivers/raw/ifpga_rawdev/ifpga_rawdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/raw/ifpga_rawdev/ifpga_rawdev.c +2
-1@@ -244,7 +244,8 @@if (ret) {IFPGA_RAWDEV_PMD_ERR ("stat on bitstream file failed: %s\n", file_name); -return -EINVAL ; + ret = -EINVAL ; + goto close_fd; } buffer_size = file_stat.st_size;
IFPGA_RAWDEV_PMD_INFO("bitstream file size: %zu\n", buffer_size);
--
1.8.3.1
PATCH v2 1/1 raw/ifpga_rawdev: fix fd leak in rte fpga do pr
In reply to Andy PeiIn rte_fpga_do_pr() function, if 'stat' returns error, rte_fpga_do_pr() returns -EINVAL without closing the 'file_fd' that has been opened.
After this patch, 'file_fd' is closed before rte_fpga_do_pr() returns -EINVAL when 'stat' returns error
Coverity issue: 279441
---
--- drivers/raw/ifpga_rawdev/ifpga_rawdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/raw/ifpga_rawdev/ifpga_rawdev.c +2 -1
@@ -244,7 +244,8 @@if (ret) {IFPGA_RAWDEV_PMD_ERR ("stat on bitstream file failed: %s\n" , file_name); -return -EINVAL ; + ret = -EINVAL ; + goto close_fd; } buffer_size = file_stat.st_size;IFPGA_RAWDEV_PMD_INFO ("bitstream file size: %zu\n" , buffer_size);
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do pr
Quoted 46 lines
-----Original Message-----
From: Pei, Andy
Sent: Wednesday, April 17, 2019 15:16
To: [email protected]
Cc: Pei, Andy <[email protected]>; Xu, Rosen <[email protected]>; Kovacevic, Marko <[email protected]>; [email protected]; [email protected]
Subject: [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do prIn
rte_fpga_do_pr()function, if 'stat' returns error,rte_fpga_do_pr()returns-EINVALwithout closing the 'file_fd' that has been opened.
After this patch, 'file_fd' is closed beforerte_fpga_do_pr()returns-EINVALwhen 'stat' returns errorCoverity issue: 279441
Fixes ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")Signed-off-by Andy Pei <[email protected]>---
--- drivers/raw/ifpga_rawdev/ifpga_rawdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/raw/ifpga_rawdev/ifpga_rawdev.c +2
-1@@ -244,7 +244,8 @@if (ret) {IFPGA_RAWDEV_PMD_ERR ("stat on bitstream file failed: %s\n", file_name); -return -EINVAL ; + ret = -EINVAL ; + goto close_fd; } buffer_size = file_stat.st_size;
Quoted 3 lines
IFPGA_RAWDEV_PMD_INFO("bitstream file size: %zu\n", buffer_size);
--
1.8.3.1
Re: [dpdk-dev] [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do pr
Quoted 14 lines
Quoted 14 lines
In
rte_fpga_do_pr()function, if 'stat' returns error,rte_fpga_do_pr()returns-EINVALwithout closing the 'file_fd' that has been opened.
After this patch, 'file_fd' is closed beforerte_fpga_do_pr()returns-EINVALwhen 'stat' returns errorCoverity issue: 279441
Fixes ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")
Quoted 3 lines
Quoted 1 line
Signed-off-by Andy Pei <[email protected]>Acked-by Rosen Xu <[email protected]>
Li Qiang <[email protected]> proposed the same patch. Why he is not referenced here?
Which patch should I merge?
Re: [dpdk-dev] [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do pr
Hi Thomas,
My patch is the same as LI Qiang's patch.
I was told that Qiang's patch cannot get onto the patchwork, so I just help him do this.
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, April 23, 2019 1:52 AM
To: Xu, Rosen <[email protected]>; Pei, Andy <[email protected]>
Cc: [email protected]; [email protected]; Kovacevic, Marko <[email protected]>; [email protected]
Subject: Re: [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do pr
Quoted 14 lines
Quoted 14 lines
In
rte_fpga_do_pr()function, if 'stat' returns error,rte_fpga_do_pr()returns-EINVALwithout closing the 'file_fd' that has been opened.
After this patch, 'file_fd' is closed beforerte_fpga_do_pr()returns-EINVALwhen 'stat' returns errorCoverity issue: 279441
Fixes ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")
Quoted 3 lines
Quoted 1 line
Signed-off-by Andy Pei <[email protected]>Acked-by Rosen Xu <[email protected]>
Li Qiang <[email protected]> proposed the same patch. Why he is not referenced here?
Which patch should I merge?
Re: [dpdk-dev] [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do pr
Hi Thomas,
Qian has some problem with his email. So some patch can't be found in patch work. For it's a urgent bug. After we have aligned with Qian, Andy send this patch. Thanks.
Quoted 48 lines
-----Original Message-----
From: Pei, Andy
Sent: Tuesday, April 23, 2019 9:19
To: Thomas Monjalon <[email protected]>; Xu, Rosen <[email protected]>
Cc: [email protected]; [email protected]; Kovacevic, Marko <[email protected]>; [email protected]
Subject: RE: [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do prHi Thomas,
My patch is the same as LI Qiang's patch.
I was told that Qiang's patch cannot get onto the patchwork, so I just help him do this.-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, April 23, 2019 1:52 AM
To: Xu, Rosen <[email protected]>; Pei, Andy <[email protected]>
Cc: [email protected]; [email protected]; Kovacevic, Marko <[email protected]>; [email protected]
Subject: Re: [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do prQuoted 14 lines
Quoted 14 lines
In
rte_fpga_do_pr()function, if 'stat' returns error,rte_fpga_do_pr()returns-EINVALwithout closing the 'file_fd' that has been opened.
After this patch, 'file_fd' is closed beforerte_fpga_do_pr()returns-EINVALwhen 'stat' returns errorCoverity issue: 279441
Fixes ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")Quoted 3 lines
Quoted 1 line
Signed-off-by Andy Pei <[email protected]>Acked-by Rosen Xu <[email protected]>Li Qiang <[email protected]> proposed the same patch. Why he is not referenced here?
Which patch should I merge?
Re: [dpdk-dev] [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do pr
When you need to re-send a patch, please apply it with "git am" so the original author is kept.
Another nit: the title is full of abbreviation, it is hard to read. The title prefix should be "raw/ifpga", even if checkpatch complains.
Please re-send, thanks.
23/04/2019 03:36, Xu, Rosen:
Quoted 51 lines
Hi Thomas,
Qian has some problem with his email. So some patch can't be found in patch work. For it's a urgent bug. After we have aligned with Qian, Andy send this patch. Thanks.
Quoted 46 lines
-----Original Message-----
From: Pei, Andy
Sent: Tuesday, April 23, 2019 9:19
To: Thomas Monjalon <[email protected]>; Xu, Rosen <[email protected]>
Cc: [email protected]; [email protected]; Kovacevic, Marko <[email protected]>; [email protected]
Subject: RE: [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do prHi Thomas,
My patch is the same as LI Qiang's patch.
I was told that Qiang's patch cannot get onto the patchwork, so I just help him do this.-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, April 23, 2019 1:52 AM
To: Xu, Rosen <[email protected]>; Pei, Andy <[email protected]>
Cc: [email protected]; [email protected]; Kovacevic, Marko <[email protected]>; [email protected]
Subject: Re: [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do prQuoted 14 lines
Quoted 14 lines
In
rte_fpga_do_pr()function, if 'stat' returns error,rte_fpga_do_pr()returns-EINVALwithout closing the 'file_fd' that has been opened.
After this patch, 'file_fd' is closed beforerte_fpga_do_pr()returns-EINVALwhen 'stat' returns errorCoverity issue: 279441
Fixes ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")Quoted 3 lines
Quoted 1 line
Signed-off-by Andy Pei <[email protected]>Acked-by Rosen Xu <[email protected]>Li Qiang <[email protected]> proposed the same patch. Why he is not referenced here?
Which patch should I merge?
Re: [dpdk-dev] [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do pr
Hi,
I saw Qiang's patch on patchwork today,
[v3] drivers: ifpga_rawdev: fix fd leak in rte_fpga_do_pr
So I think it seems OK to ignore my patch.
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, April 23, 2019 4:45 PM
To: Pei, Andy <[email protected]>
Cc: Xu, Rosen <[email protected]>; [email protected]; [email protected]; Kovacevic, Marko <[email protected]>; [email protected]
Subject: Re: [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do pr
When you need to re-send a patch, please apply it with "git am" so the original author is kept.
Another nit: the title is full of abbreviation, it is hard to read. The title prefix should be "raw/ifpga", even if checkpatch complains.
Please re-send, thanks.
23/04/2019 03:36, Xu, Rosen:
Quoted 52 lines
Hi Thomas,
Qian has some problem with his email. So some patch can't be found in patch work. For it's a urgent bug. After we have aligned with Qian, Andy send this patch. Thanks.
Quoted 47 lines
-----Original Message-----
From: Pei, Andy
Sent: Tuesday, April 23, 2019 9:19
To: Thomas Monjalon <[email protected]>; Xu, Rosen <[email protected]>
Cc: [email protected]; [email protected]; Kovacevic, Marko <[email protected]>; [email protected]
Subject: RE: [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do prHi Thomas,
My patch is the same as LI Qiang's patch.
I was told that Qiang's patch cannot get onto the patchwork, so I just help him do this.-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, April 23, 2019 1:52 AM
To: Xu, Rosen <[email protected]>; Pei, Andy <[email protected]>
Cc: [email protected]; [email protected]; Kovacevic, Marko <[email protected]>; [email protected]
Subject: Re: [dpdk-stable] [PATCH v2] raw/ifpga_rawdev: fix fd leak in rte fpga do prQuoted 15 lines
Quoted 15 lines
In
rte_fpga_do_pr()function, if 'stat' returns error,rte_fpga_do_pr()returns-EINVALwithout closing the 'file_fd' that has been opened.
After this patch, 'file_fd' is closed beforerte_fpga_do_pr()returns-EINVALwhen 'stat' returns errorCoverity issue: 279441
Fixes ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdevdriver")
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]Quoted 3 lines
Quoted 1 line
Signed-off-by Andy Pei <[email protected]>Acked-by Rosen Xu <[email protected]>Li Qiang <[email protected]> proposed the same patch. Why he is not referenced here?
Which patch should I merge?