Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1531230

Re: [PATCH] vxlan: fix a potential issue when create a new vxlan fdb entry.

From Jiri Benc <jbenc@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] vxlan: fix a potential issue when create a new vxlan fdb entry.
Date 2016-11-28 12:40 +0100
Message-ID <sIsrT-1ue-7@gated-at.bofh.it> (permalink)
References <sIoeB-7nB-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 28 Nov 2016 15:02:23 +0800, Haishuang Yan wrote:
> vxlan_fdb_append may return error, so add the proper check,
> otherwise it will cause memory leak.
> 
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
> ---
>  drivers/net/vxlan.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 21e92be..3b7b237 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -611,6 +611,7 @@ static int vxlan_fdb_create(struct vxlan_dev *vxlan,
>  	struct vxlan_rdst *rd = NULL;
>  	struct vxlan_fdb *f;
>  	int notify = 0;
> +	int rc = 0;

The initialization to 0 should not be needed. Looks good otherwise.

Thanks,

 Jiri

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] vxlan: fix a potential issue when create a new vxlan fdb entry. Haishuang Yan <yanhaishuang@cmss.chinamobile.com> - 2016-11-28 08:10 +0100
  Re: [PATCH] vxlan: fix a potential issue when create a new vxlan  fdb entry. Jiri Benc <jbenc@redhat.com> - 2016-11-28 12:40 +0100

csiph-web