netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Schiller <ms@dev.tdt.de>
To: Xie He <xie.he.0141@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	linux-x25@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: lapb: Decrease the refcount of "struct lapb_cb" in lapb_device_event
Date: Wed, 06 Jan 2021 08:35:32 +0100	[thread overview]
Message-ID: <4bba668b619e32e87e713b5b9d0876a7@dev.tdt.de> (raw)
In-Reply-To: <20201231174331.64539-1-xie.he.0141@gmail.com>

On 2020-12-31 18:43, Xie He wrote:
> In lapb_device_event, lapb_devtostruct is called to get a reference to
> an object of "struct lapb_cb". lapb_devtostruct increases the refcount
> of the object and returns a pointer to it. However, we didn't decrease
> the refcount after we finished using the pointer. This patch fixes this
> problem.
> 
> Fixes: a4989fa91110 ("net/lapb: support netdev events")
> Cc: Martin Schiller <ms@dev.tdt.de>
> Signed-off-by: Xie He <xie.he.0141@gmail.com>
> ---
>  net/lapb/lapb_iface.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c
> index 213ea7abc9ab..40961889e9c0 100644
> --- a/net/lapb/lapb_iface.c
> +++ b/net/lapb/lapb_iface.c
> @@ -489,6 +489,7 @@ static int lapb_device_event(struct notifier_block
> *this, unsigned long event,
>  		break;
>  	}
> 
> +	lapb_put(lapb);
>  	return NOTIFY_DONE;
>  }

Well, I guess I missed that one. Thank you!

Acked-by: Martin Schiller <ms@dev.tdt.de>

      parent reply	other threads:[~2021-01-06  7:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-31 17:43 [PATCH net] net: lapb: Decrease the refcount of "struct lapb_cb" in lapb_device_event Xie He
2021-01-04 21:50 ` patchwork-bot+netdevbpf
2021-01-06  7:35 ` Martin Schiller [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=4bba668b619e32e87e713b5b9d0876a7@dev.tdt.de \
    --to=ms@dev.tdt.de \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-x25@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xie.he.0141@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;
as well as URLs for NNTP newsgroup(s).