[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAO+b5-rL5bUmu-eYt5mf66rEHme2gghrd6ZApZPGC3D0shbQbw@mail.gmail.com>
Date: Fri, 13 Jan 2012 08:20:37 +0100
From: Bart Van Assche <bvanassche@....org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Mike Christie <michaelc@...wisc.edu>,
Eric Paris <eparis@...hat.com>
Subject: Re: Consequences of commit 16e5726269611b71c930054ffe9b858c1cea88eb
On Thu, Jan 12, 2012 at 9:59 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Le jeudi 12 janvier 2012 à 19:14 +0000, Bart Van Assche a écrit :
> > If my analysis is correct commit
> > 16e5726269611b71c930054ffe9b858c1cea88eb ("af_unix: dont send
> > SCM_CREDENTIALS by default") changes the value of
> > NETLINK_CREDS(skb)->pid from the sender pid into zero. Does that mean
> > that the code using that construct did work in kernel 3.1 but that it
> > is broken in kernel 3.2 ? Should that commit be reverted or will
> > someone fix the code that uses NETLINK_CREDS() ? Would changing
> > NETLINK_CREDS(skb)->pid into NETLINK_CB(skb).pid be sufficient ?
> >
> > Thanks,
> >
> > Bart.
> >
> > $ git grep 'NETLINK_CREDS([a-zA-Z0-9_]*)->pid'
> > drivers/scsi/scsi_netlink.c: pid = NETLINK_CREDS(skb)->pid;
> > kernel/audit.c: pid = NETLINK_CREDS(skb)->pid;
>
> What is your problem exactly ?
While porting some kernel code to 3.2 that communicates with user
space via netlink and that works fine with kernel 3.1 and many
previous kernels I noticed that netlink communication from kernel to
user space was broken with kernel 3.2. I could get that code running
on kernel 3.2 after having reverted commit 16e5726. And with that
commit in place the code also started working if I changed a single
occurrence of NETLINK_CREDS(skb)->pid into NETLINK_CB(skb).pid in the
kernel code that processes received netlink messages.
Bart.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists