Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: alan@linux.intel.com
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH] drivers/tty/serial: avoid double free after call ioc4_serial_remove_one
Date: Thu, 10 Jan 2013 16:03:38 +0800	[thread overview]
Message-ID: <50EE75DA.6000505@asianux.com> (raw)
In-Reply-To: <50DACC2F.5080302@asianux.com>

Hello Alan Cox:

  can you have time to give a glance for it ?

  I send it according to the MAINTAINER file,
  if I send to an incorrect member, please tell me.

  thanks.

gchen

于 2012年12月26日 18:06, Chen Gang 写道:
> 
>   before goto out5,  soft, control, serial are all assigned to idd
>   after finish call ioc4_serial_remove_one, all resources are released
>   we need return instead of go on, or double free
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
>  drivers/tty/serial/ioc4_serial.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/ioc4_serial.c b/drivers/tty/serial/ioc4_serial.c
> index 3e7da10..c4e30b8 100644
> --- a/drivers/tty/serial/ioc4_serial.c
> +++ b/drivers/tty/serial/ioc4_serial.c
> @@ -2883,6 +2883,7 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd)
>  	/* error exits that give back resources */
>  out5:
>  	ioc4_serial_remove_one(idd);
> +	return ret;
>  out4:
>  	kfree(soft);
>  out3:
> 


-- 
Chen Gang

Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2013-01-10  8:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-26 10:06 [PATCH] drivers/tty/serial: avoid double free after call ioc4_serial_remove_one Chen Gang
2013-01-10  8:03 ` Chen Gang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50EE75DA.6000505@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=alan@linux.intel.com \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox