Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorDavid S. Miller <davem@davemloft.net>
Sat, 15 Sep 2012 15:43:53 +0000 (11:43 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Sep 2012 15:43:53 +0000 (11:43 -0400)
Conflicts:
net/netfilter/nfnetlink_log.c
net/netfilter/xt_LOG.c

Rather easy conflict resolution, the 'net' tree had bug fixes to make
sure we checked if a socket is a time-wait one or not and elide the
logging code if so.

Whereas on the 'net-next' side we are calculating the UID and GID from
the creds using different interfaces due to the user namespace changes
from Eric Biederman.

Signed-off-by: David S. Miller <davem@davemloft.net>
35 files changed:
1  2 
Documentation/feature-removal-schedule.txt
drivers/bluetooth/btusb.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
drivers/net/ethernet/ti/davinci_mdio.c
drivers/net/usb/qmi_wwan.c
drivers/net/usb/sierra_net.c
drivers/net/wireless/ath/ath9k/xmit.c
drivers/net/wireless/mwifiex/cmdevt.c
drivers/net/wireless/rt2x00/rt2x00dev.c
include/net/bluetooth/smp.h
include/net/xfrm.h
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c
net/core/dev.c
net/core/sock.c
net/ipv4/udp.c
net/ipv6/tcp_ipv6.c
net/ipv6/udp.c
net/l2tp/l2tp_eth.c
net/mac80211/cfg.c
net/mac80211/mlme.c
net/netfilter/nf_conntrack_proto_tcp.c
net/netfilter/nfnetlink_log.c
net/netfilter/xt_LOG.c
net/openvswitch/actions.c
net/openvswitch/datapath.c
net/openvswitch/flow.h
net/sctp/output.c
net/socket.c
net/wireless/nl80211.c
net/xfrm/xfrm_state.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/core/dev.c
Simple merge
diff --cc net/core/sock.c
Simple merge
diff --cc net/ipv4/udp.c
Simple merge
Simple merge
diff --cc net/ipv6/udp.c
Simple merge
Simple merge
Simple merge
Simple merge
index 8cb67c4dbd620661e34fa95a1192c67071a455ae,5cfb5bedb2b8e8f2fa44ed936a7cab265b5878e6..10067e3112c57fec8087dac753e56dacd2012a37
@@@ -501,16 -500,14 +502,16 @@@ __build_packet_message(struct nfulnl_in
        }
  
        /* UID */
-       if (skb->sk) {
-               read_lock_bh(&skb->sk->sk_callback_lock);
-               if (skb->sk->sk_socket && skb->sk->sk_socket->file) {
-                       struct file *file = skb->sk->sk_socket->file;
+       sk = skb->sk;
+       if (sk && sk->sk_state != TCP_TIME_WAIT) {
+               read_lock_bh(&sk->sk_callback_lock);
+               if (sk->sk_socket && sk->sk_socket->file) {
+                       struct file *file = sk->sk_socket->file;
 -                      __be32 uid = htonl(file->f_cred->fsuid);
 -                      __be32 gid = htonl(file->f_cred->fsgid);
 +                      __be32 uid = htonl(from_kuid_munged(inst->peer_user_ns,
 +                                                          file->f_cred->fsuid));
 +                      __be32 gid = htonl(from_kgid_munged(inst->peer_user_ns,
 +                                                          file->f_cred->fsgid));
-                       /* need to unlock here since NLA_PUT may goto */
-                       read_unlock_bh(&skb->sk->sk_callback_lock);
+                       read_unlock_bh(&sk->sk_callback_lock);
                        if (nla_put_be32(inst->skb, NFULA_UID, uid) ||
                            nla_put_be32(inst->skb, NFULA_GID, gid))
                                goto nla_put_failure;
index 02a2bf49dcbd13d307d4f0128fe092ca51e68eef,91e9af4d1f42c3baef9af1261c9464c70cd1bac0..aeb19710a6fd37883d85c5144d4897b94a8f0b6f
@@@ -145,6 -145,19 +145,21 @@@ static int dump_tcp_header(struct sbuf
        return 0;
  }
  
 -      if (sk->sk_socket && sk->sk_socket->file)
+ static void dump_sk_uid_gid(struct sbuff *m, struct sock *sk)
+ {
+       if (!sk || sk->sk_state == TCP_TIME_WAIT)
+               return;
+       read_lock_bh(&sk->sk_callback_lock);
 -                      sk->sk_socket->file->f_cred->fsuid,
 -                      sk->sk_socket->file->f_cred->fsgid);
++      if (sk->sk_socket && sk->sk_socket->file) {
++              const struct cred *cred = sk->sk_socket->file->f_cred;
+               sb_add(m, "UID=%u GID=%u ",
++                     from_kuid_munged(&init_user_ns, cred->fsuid),
++                     from_kgid_munged(&init_user_ns, cred->fsgid));
++      }
+       read_unlock_bh(&sk->sk_callback_lock);
+ }
  /* One level of recursion won't kill us */
  static void dump_ipv4_packet(struct sbuff *m,
                        const struct nf_loginfo *info,
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/socket.c
Simple merge
Simple merge
Simple merge