Merge remote-tracking branch 'stable/linux-3.0.y' into develop-3.0-jb
author黄涛 <huangtao@rock-chips.com>
Tue, 21 Aug 2012 05:11:48 +0000 (13:11 +0800)
committer黄涛 <huangtao@rock-chips.com>
Tue, 21 Aug 2012 05:11:48 +0000 (13:11 +0800)
Conflicts:
Makefile
drivers/net/tun.c
drivers/net/wireless/rt2x00/rt61pci.c
drivers/usb/core/hub.c
sound/soc/codecs/wm8994.c

12 files changed:
1  2 
drivers/mfd/wm831x-otp.c
drivers/net/tun.c
drivers/rtc/rtc-wm831x.c
drivers/usb/core/hub.c
drivers/usb/gadget/u_ether.c
include/linux/cpu.h
include/linux/sched.h
kernel/fork.c
kernel/futex.c
kernel/power/suspend.c
mm/page_alloc.c
net/ipv4/tcp.c

index f742745ff354ec2bc485d533805f02340a11d2fd,b90f3e06b6c957f6a73aa87e0eb9bbec2f38fa58..b90f3e06b6c957f6a73aa87e0eb9bbec2f38fa58
mode 100755,100644..100755
index 76b865065679c756003bdbc3dbb7d491d0b4fd97,a631bf71fee576d9e4be5de023f50a0f0a774471..3cc22b9eda534fc5f4d053601a60b3dfbda06f0c
@@@ -1239,16 -1239,12 +1239,18 @@@ static long __tun_chr_ioctl(struct fil
        int vnet_hdr_sz;
        int ret;
  
-       if (cmd == TUNSETIFF || _IOC_TYPE(cmd) == 0x89)
 +#ifdef CONFIG_ANDROID_PARANOID_NETWORK
 +      if (cmd != TUNGETIFF && !capable(CAP_NET_ADMIN)) {
 +              return -EPERM;
 +      }
 +#endif
 +
+       if (cmd == TUNSETIFF || _IOC_TYPE(cmd) == 0x89) {
                if (copy_from_user(&ifr, argp, ifreq_len))
                        return -EFAULT;
+       } else {
+               memset(&ifr, 0, sizeof(ifr));
+       }
        if (cmd == TUNGETFEATURES) {
                /* Currently this just means: "what IFF flags are valid?".
                 * This is needed because we never checked for invalid flags on
index c919ec3e860c34bf6f11533b4f8cccfe91fdbc33,f3c211099a1482947ff5f7fd9427961657493110..eed33532e8f7e4e5989a9a328dbf322b34c22c90
mode 100755,100644..100755
index a33954b424efbf24cf005a53651aaf68a957357a,3c0aa028fb3cb797d6c83d15369733662b2651e6..37a62d644c81f1b114868a32c2a44aa6a9aab1ec
mode 100755,100644..100755
@@@ -1905,11 -1903,15 +1906,19 @@@ int usb_new_device(struct usb_device *u
        /* Tell the world! */
        announce_device(udev);
  
 -      device_enable_async_suspend(&udev->dev);
+       if (udev->serial)
+               add_device_randomness(udev->serial, strlen(udev->serial));
+       if (udev->product)
+               add_device_randomness(udev->product, strlen(udev->product));
+       if (udev->manufacturer)
+               add_device_randomness(udev->manufacturer,
+                                     strlen(udev->manufacturer));
 +      /* kever@rk 20111205
 +       * We don't use async suspend in rk29 usb
 +       * to make sure usb1.1 host is suspend before usb 2.0 host.
 +       */
 +      //device_enable_async_suspend(&udev->dev);
        /* Register the device.  The device driver is responsible
         * for configuring the device and invoking the add-device
         * notifier chain (used by usbfs and possibly others).
Simple merge
Simple merge
Simple merge
diff --cc kernel/fork.c
Simple merge
diff --cc kernel/futex.c
Simple merge
Simple merge
diff --cc mm/page_alloc.c
Simple merge
diff --cc net/ipv4/tcp.c
Simple merge