netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: erik.hugne@ericsson.com
Cc: netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net,
	jon.maloy@ericsson.com, maloy@donjonn.com,
	ying.xue@windriver.com, paul.gortmaker@windriver.com,
	richard.alpe@ericsson.com
Subject: Re: [PATCH net-next v2 1/6] tipc: allow connection shutdown callback to be invoked in advance
Date: Wed, 05 Mar 2014 23:56:18 -0500 (EST)	[thread overview]
Message-ID: <20140305.235618.31002872977881096.davem@davemloft.net> (raw)
In-Reply-To: <1394006178-23966-2-git-send-email-erik.hugne@ericsson.com>

From: <erik.hugne@ericsson.com>
Date: Wed, 5 Mar 2014 08:56:13 +0100

> @@ -413,8 +411,11 @@ int tipc_conn_sendmsg(struct tipc_server *s, int conid,
>  	struct tipc_conn *con;
>  
>  	con = tipc_conn_lookup(s, conid);
> -	if (!con)
> +	if (!con) {
> +		pr_err("Connection %d not found on server %s\n", conid,
> +		       s->name);
>  		return -EINVAL;
> +	}
>  
>  	e = tipc_alloc_entry(data, len);
>  	if (!e) {

You really don't want to add kernel log messages which might be easily
triggerable by the user.  Please remove this.

This is the second such case I've pointed out in this patch set, please
audit the rest of your changes for the same issue before resubmitting
so we don't go into this loop yet another time.

Thank you.

  reply	other threads:[~2014-03-06  4:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05  7:56 [PATCH net-next v2 0/6] tipc: refcount and memory leak fixes erik.hugne
2014-03-05  7:56 ` [PATCH net-next v2 1/6] tipc: allow connection shutdown callback to be invoked in advance erik.hugne
2014-03-06  4:56   ` David Miller [this message]
2014-03-06  9:06     ` Erik Hugne
2014-03-09 17:48       ` Ben Hutchings
2014-03-05  7:56 ` [PATCH net-next v2 2/6] tipc: fix connection refcount leak erik.hugne
2014-03-05  7:56 ` [PATCH net-next v2 3/6] tipc: avoid to unnecessary process switch under non-block mode erik.hugne
2014-03-05  7:56 ` [PATCH net-next v2 4/6] tipc: drop subscriber connection id invalidation erik.hugne
2014-03-05  7:56 ` [PATCH net-next v2 5/6] tipc: fix memory leak during module removal erik.hugne
2014-03-05  7:56 ` [PATCH net-next v2 6/6] tipc: don't log disabled tasklet handler errors erik.hugne

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=20140305.235618.31002872977881096.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=erik.hugne@ericsson.com \
    --cc=jon.maloy@ericsson.com \
    --cc=maloy@donjonn.com \
    --cc=netdev@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=richard.alpe@ericsson.com \
    --cc=tipc-discussion@lists.sourceforge.net \
    --cc=ying.xue@windriver.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).