From: jamal <hadi@cyberus.ca>
To: Thomas Graf <tgraf@suug.ch>
Cc: "David S. Miller" <davem@davemloft.net>, netdev <netdev@oss.sgi.com>
Subject: Re: PATCH: ioctl send PID in netlink events
Date: Thu, 02 Jun 2005 21:37:35 -0400 [thread overview]
Message-ID: <1117762655.6095.3.camel@localhost.localdomain> (raw)
In-Reply-To: <20050603010059.GU15391@postel.suug.ch>
On Fri, 2005-03-06 at 03:00 +0200, Thomas Graf wrote:
> > Index: net/ipv4/devinet.c
> > ===================================================================
> > --- e4f7366a04d973a42a948d3b4175d66e9adf143e/net/ipv4/devinet.c (mode:100644)
> > +++ uncommitted/net/ipv4/devinet.c (mode:100644)
> > @@ -236,6 +236,7 @@
> > struct in_ifaddr *promote = NULL;
> > struct in_ifaddr *ifa1 = *ifap;
> >
> > + printk("inet_del_ifa: pid %d\n",current->pid);
> > ASSERT_RTNL();
> >
> > /* 1. Deleting primary ifaddr forces deletion all secondaries
> > @@ -305,6 +306,7 @@
> >
> > ASSERT_RTNL();
> >
> > + printk("inet_insert_ifa: pid %d\n",current->pid);
> > if (!ifa->ifa_local) {
> > inet_free_ifa(ifa);
> > return 0;
>
> Don't you want to remove these?
>
>
Yes, how did those get there? ;->
> > Index: net/ipv4/fib_semantics.c
> > ===================================================================
> > --- e4f7366a04d973a42a948d3b4175d66e9adf143e/net/ipv4/fib_semantics.c (mode:100644)
> > +++ uncommitted/net/ipv4/fib_semantics.c (mode:100644)
> > @@ -276,7 +276,7 @@
> > struct nlmsghdr *n, struct netlink_skb_parms *req)
> > {
> > struct sk_buff *skb;
> > - u32 pid = req ? req->pid : 0;
> > + u32 pid = req ? req->pid : n->nlmsg_pid;
> > int size = NLMSG_SPACE(sizeof(struct rtmsg)+256);
> >
> > skb = alloc_skb(size, GFP_KERNEL);
> > @@ -1035,7 +1035,7 @@
> > }
> >
> > nl->nlmsg_flags = NLM_F_REQUEST;
> > - nl->nlmsg_pid = 0;
> > + nl->nlmsg_pid = current->pid;
> > nl->nlmsg_seq = 0;
> > nl->nlmsg_len = NLMSG_LENGTH(sizeof(*rtm));
> > if (cmd == SIOCDELRT) {
>
> Neat ;->
The second one could probably use the new macros.
Maybe i will wait until Dave puts this in his tree and send a small
change; else you could send it.
cheers,
jamal
next prev parent reply other threads:[~2005-06-03 1:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-02 13:52 PATCH: ioctl send PID in netlink events jamal
2005-06-03 1:00 ` Thomas Graf
2005-06-03 1:37 ` jamal [this message]
2005-06-03 3:32 ` jamal
2005-06-03 5:09 ` David S. 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=1117762655.6095.3.camel@localhost.localdomain \
--to=hadi@cyberus.ca \
--cc=davem@davemloft.net \
--cc=netdev@oss.sgi.com \
--cc=tgraf@suug.ch \
/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).