public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gerald Schaefer <gerald.schaefer@de.ibm.com>
To: Zhouyi Zhou <zhouzhouyi@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-s390@vger.kernel.org>,
	<joe@perches.com>, <gang.chen@asianux.com>, <linux390@de.ibm.com>,
	<heiko.carstens@de.ibm.com>, <schwidefsky@de.ibm.com>,
	Zhouyi Zhou <yizhouzhou@ict.ac.cn>
Subject: Re: [PATCH] s390: correct misuses of module_put in appldata_generic_handler.
Date: Mon, 17 Mar 2014 14:28:51 +0100	[thread overview]
Message-ID: <20140317142851.50e5f533@thinkpad> (raw)
In-Reply-To: <1394890540-2435-1-git-send-email-zhouzhouyi@gmail.com>

On Sat, 15 Mar 2014 21:35:40 +0800
Zhouyi Zhou <zhouzhouyi@gmail.com> wrote:

> correct misuses of module_put in  appldata_generic_handler

Sorry, I don't see any misuse, could you elaborate?

> 
> Signed-off-by: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
> ---
>  arch/s390/appldata/appldata_base.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
> index 47c8630..683e0282 100644
> --- a/arch/s390/appldata/appldata_base.c
> +++ b/arch/s390/appldata/appldata_base.c
> @@ -343,7 +343,6 @@ appldata_generic_handler(struct ctl_table *ctl, int write,
>  		// protect work queue callback
>  		if (!try_module_get(ops->owner)) {
>  			mutex_unlock(&appldata_ops_mutex);
> -			module_put(ops->owner);
>  			return -ENODEV;
>  		}
>  		ops->callback(ops->data);	// init record
> @@ -354,7 +353,6 @@ appldata_generic_handler(struct ctl_table *ctl, int write,
>  		if (rc != 0) {
>  			pr_err("Starting the data collection for %s "
>  			       "failed with rc=%d\n", ops->name, rc);
> -			module_put(ops->owner);
>  		} else
>  			ops->active = 1;
>  	} else if ((buf[0] == '0') && (ops->active == 1)) {
> @@ -365,7 +363,6 @@ appldata_generic_handler(struct ctl_table *ctl, int write,
>  		if (rc != 0)
>  			pr_err("Stopping the data collection for %s "
>  			       "failed with rc=%d\n", ops->name, rc);
> -		module_put(ops->owner);
>  	}
>  	mutex_unlock(&appldata_ops_mutex);
>  out:


  reply	other threads:[~2014-03-17 13:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-15 13:35 [PATCH] s390: correct misuses of module_put in appldata_generic_handler Zhouyi Zhou
2014-03-17 13:28 ` Gerald Schaefer [this message]
2014-03-18  1:24   ` Zhouyi Zhou
2014-03-18 13:34     ` Gerald Schaefer
2014-03-19  0:59       ` Zhouyi Zhou

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=20140317142851.50e5f533@thinkpad \
    --to=gerald.schaefer@de.ibm.com \
    --cc=gang.chen@asianux.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=yizhouzhou@ict.ac.cn \
    --cc=zhouzhouyi@gmail.com \
    /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