netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, josh@joshtriplett.org,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH 0/2] rhashtable: Arbitrary rehashing
Date: Thu, 12 Mar 2015 16:46:35 +0000	[thread overview]
Message-ID: <20150312164635.GA11089@casper.infradead.org> (raw)
In-Reply-To: <20150309222631.GA12221@gondor.apana.org.au>

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

On 03/10/15 at 09:26am, Herbert Xu wrote:
> I have tested it using netlink but obviously more testing especially
> using netfilter would be welcome.

I ran the attached bind_netlink test written by Ying Xue and it
currently crashes with:

[  108.693908] BUG: unable to handle kernel paging request at fffffffffffffe68

I'm running bind_netlink like this:

while true; do
    ./bind_netlink 9000 324234324&
    ./bind_netlink 9000 888448422&
    ./bind_netlink 9000 324
done

I tested with the synchronize_rcu() fix on top as well and that
didn't help so it must be something else.

[-- Attachment #2: bind_netlink.c --]
[-- Type: text/plain, Size: 1043 bytes --]

#include <sys/types.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <netinet/in.h>
#include <linux/netlink.h>

void diep(char *err)
{
	perror(err);
	exit(1);
}

int main(int argc, char *argv[])
{
	int i;
	int *fds;
	int num_ports;
	struct sockaddr_nl local;

	srand(strtoul(argv[2], NULL, 0));

	if (argc < 2) {
		fprintf(stderr, "Usage: %s <PORTS>\n", argv[0]);
		exit(1);
	}

	num_ports = atoi(argv[optind]);

	printf("Create %u ports\n", num_ports);

	fds = malloc(sizeof(int) * num_ports);
	for (i = 1; i <= num_ports; i++) {
		if (!(fds[i] = socket(PF_NETLINK, SOCK_RAW, 0)))
			diep("socket");

		memset(&local, 0, sizeof(local));
		local.nl_family = AF_NETLINK;
		local.nl_pid = rand();
		local.nl_groups = 0;
		if(bind(fds[i], (struct sockaddr *)&local, sizeof(local)) != 0){
			diep("socket");
		}
		
		if (!(i % 1000))
			printf("Created %u ports\n", i);

	}
	printf("Ports successfully created, terminating\n");

	return 0;
}

  parent reply	other threads:[~2015-03-12 16:46 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-31 10:21 rhashtable: Move hash_rnd into bucket_table Herbert Xu
2015-01-31 10:23 ` [RFC] rhashtable: rhashtable_rehash Herbert Xu
2015-02-02 11:16   ` Thomas Graf
2015-03-09 10:13     ` Herbert Xu
2015-01-31 11:17 ` rhashtable: Move hash_rnd into bucket_table Thomas Graf
2015-02-03  3:19 ` David Miller
2015-02-03  3:26   ` David Miller
2015-02-03 20:17     ` Herbert Xu
2015-02-03 20:32       ` [PATCH 0/4] rhashtable: Add iterators and use them Herbert Xu
2015-02-03 20:33         ` [PATCH 1/4] rhashtable: Fix potential crash on destroy in rhashtable_shrink Herbert Xu
2015-02-03 20:33         ` [PATCH 2/4] rhashtable: Introduce rhashtable_walk_* Herbert Xu
2015-02-03 20:33         ` [PATCH 3/4] netlink: Use rhashtable walk iterator Herbert Xu
2015-02-05  0:25           ` Thomas Graf
2015-02-03 20:33         ` [PATCH 4/4] netfilter: " Herbert Xu
2015-02-05  4:35         ` [PATCH 0/4] rhashtable: Add iterators and use them David Miller
2015-03-09  9:58       ` rhashtable: Move hash_rnd into bucket_table Herbert Xu
2015-03-09 16:26         ` Daniel Borkmann
2015-03-09 22:21           ` Herbert Xu
2015-03-09 19:51         ` David Miller
2015-03-09 19:55           ` David Miller
2015-03-09 22:26         ` [PATCH 0/2] rhashtable: Arbitrary rehashing Herbert Xu
2015-03-09 22:27           ` [PATCH 1/2] rhashtable: Move hash_rnd into bucket_table Herbert Xu
2015-03-10 17:20             ` Thomas Graf
2015-03-10 21:48               ` Herbert Xu
2015-03-09 22:27           ` [PATCH 2/2] rhashtable: Add arbitrary rehash function Herbert Xu
2015-03-10 18:17             ` Thomas Graf
2015-03-10 22:01               ` Herbert Xu
2015-03-10 22:43             ` [PATCH v2] " Herbert Xu
2015-03-11 20:37               ` David Miller
2015-03-11 21:07                 ` Herbert Xu
2015-03-09 22:32           ` [PATCH 0/2] rhashtable: Arbitrary rehashing Josh Triplett
2015-03-10 18:20           ` Thomas Graf
2015-03-12 16:46           ` Thomas Graf [this message]
2015-03-13  1:54             ` Herbert Xu
2015-03-13  3:02               ` 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=20150312164635.GA11089@casper.infradead.org \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=josh@joshtriplett.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.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).