mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: <davem@davemloft.net>, <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCH] appletalk: Set error code while register_snap_client
Date: Tue, 30 Apr 2019 19:30:59 +0800	[thread overview]
Message-ID: <b1fdc9c5-ec67-20af-15c6-7e966c2b65e1@huawei.com> (raw)
In-Reply-To: <20190430112840.43452-1-yuehaibing@huawei.com>

patch title need fix, Pls ignore this.

On 2019/4/30 19:28, YueHaibing wrote:
> If register_snap_client fails in atalk_init,
> error code should be set, otherwise it will
> triggers NULL pointer dereference while unloading
> module.
> 
> Fixes: 9804501fa122 ("appletalk: Fix potential NULL pointer dereference in unregister_snap_client")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  net/appletalk/ddp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
> index 709d254..dbe8b19 100644
> --- a/net/appletalk/ddp.c
> +++ b/net/appletalk/ddp.c
> @@ -1920,6 +1920,7 @@ static int __init atalk_init(void)
>  	ddp_dl = register_snap_client(ddp_snap_id, atalk_rcv);
>  	if (!ddp_dl) {
>  		pr_crit("Unable to register DDP with SNAP.\n");
> +		rc = -ENOMEM;
>  		goto out_sock;
>  	}
>  
> 


      reply	other threads:[~2019-04-30 11:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30 11:28 YueHaibing
2019-04-30 11:30 ` YueHaibing [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=b1fdc9c5-ec67-20af-15c6-7e966c2b65e1@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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

all inboxes | Powered by JetHome®