netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org, dvyukov@google.com,
	nhorman@tuxdriver.com, vyasevich@gmail.com,
	linux-sctp@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller@googlegroups.com, kcc@google.com, glider@google.com,
	sasha.levin@oracle.com, edumazet@google.com, davem@davemloft.net
Subject: [PATCH] sctp: fix noderef.cocci warnings
Date: Tue, 8 Mar 2016 07:17:55 +0800	[thread overview]
Message-ID: <20160307231755.GA149755@lkp-ib04> (raw)
In-Reply-To: <6cddeac76bb79521e58f9bbba653db774191eb1c.1457382433.git.marcelo.leitner@gmail.com>

net/sctp/bind_addr.c:458:42-48: ERROR: application of sizeof to pointer

 sizeof when applied to a pointer typed expression gives the size of
 the pointer

Generated by: scripts/coccinelle/misc/noderef.cocci

CC: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 bind_addr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/sctp/bind_addr.c
+++ b/net/sctp/bind_addr.c
@@ -455,7 +455,7 @@ static int sctp_copy_one_addr(struct net
 		    (((AF_INET6 == addr->sa.sa_family) &&
 		      (flags & SCTP_ADDR6_ALLOWED) &&
 		      (flags & SCTP_ADDR6_PEERSUPP))))
-			error = sctp_add_bind_addr(dest, addr, sizeof(addr),
+			error = sctp_add_bind_addr(dest, addr, sizeof(*addr),
 						   SCTP_ADDR_SRC, gfp);
 	}
 

  reply	other threads:[~2016-03-07 23:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07 23:17 [PATCH net] sctp: fix copying more bytes than expected in sctp_add_bind_addr kbuild test robot
2016-03-07 21:17 ` Marcelo Ricardo Leitner
2016-03-07 23:17   ` kbuild test robot [this message]
2016-03-07 23:27 ` Marcelo Ricardo Leitner
2016-03-08  4:15   ` David Miller

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=20160307231755.GA149755@lkp-ib04 \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=dvyukov@google.com \
    --cc=edumazet@google.com \
    --cc=glider@google.com \
    --cc=kbuild-all@01.org \
    --cc=kcc@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=sasha.levin@oracle.com \
    --cc=syzkaller@googlegroups.com \
    --cc=vyasevich@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).