Netdev Archive mirror
 help / color / mirror / Atom feed
From: Ratheesh Kannoth <rkannoth@marvell.com>
To: Duoming Zhou <duoming@zju.edu.cn>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-hams@vger.kernel.org>, <pabeni@redhat.com>,
	<kuba@kernel.org>, <edumazet@google.com>, <davem@davemloft.net>,
	<jreuter@yaina.de>, <dan.carpenter@linaro.org>
Subject: Re: [PATCH net v6 1/3] ax25: Use kernel universal linked list to implement ax25_dev_list
Date: Thu, 9 May 2024 08:42:53 +0530	[thread overview]
Message-ID: <20240509031253.GA1077013@maili.marvell.com> (raw)
In-Reply-To: <d52c1f4dbd6e09769007233aa343010e98c85f0d.1715219007.git.duoming@zju.edu.cn>

On 2024-05-09 at 07:26:12, Duoming Zhou (duoming@zju.edu.cn) wrote:
>  		if (ax25cmp(addr, (const ax25_address *)ax25_dev->dev->dev_addr) == 0) {
>  			res = ax25_dev;
>  			ax25_dev_hold(ax25_dev);
> @@ -52,6 +53,9 @@ void ax25_dev_device_up(struct net_device *dev)
>  {
>  	ax25_dev *ax25_dev;
>
> +	/* Initialized the list for the first entry */
> +	if (!ax25_dev_list.next)
will there be any case where this condition is true ? LIST_HEAD() or list_del() will never
make this condition true.

> +		INIT_LIST_HEAD(&ax25_dev_list);
>  	ax25_dev = kzalloc(sizeof(*ax25_dev), GFP_KERNEL);
>

  reply	other threads:[~2024-05-09  3:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09  1:55 [PATCH net v6 0/3] ax25: Fix issues of ax25_dev and net_device Duoming Zhou
2024-05-09  1:56 ` [PATCH net v6 1/3] ax25: Use kernel universal linked list to implement ax25_dev_list Duoming Zhou
2024-05-09  3:12   ` Ratheesh Kannoth [this message]
2024-05-09  1:56 ` [PATCH net v6 2/3] ax25: Fix reference count leak issues of ax25_dev Duoming Zhou
2024-05-09  1:56 ` [PATCH net v6 3/3] ax25: Fix reference count leak issues of net_device Duoming 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=20240509031253.GA1077013@maili.marvell.com \
    --to=rkannoth@marvell.com \
    --cc=dan.carpenter@linaro.org \
    --cc=davem@davemloft.net \
    --cc=duoming@zju.edu.cn \
    --cc=edumazet@google.com \
    --cc=jreuter@yaina.de \
    --cc=kuba@kernel.org \
    --cc=linux-hams@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 read-only IMAP folder(s) and NNTP newsgroup(s).