1. 20 Aug, 2012 19 commits
  2. 19 Aug, 2012 11 commits
  3. 18 Aug, 2012 10 commits
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 6dab7ede
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "The largest thing in this set of changes is bringing back some of the
        ARMv3 code to fix a compile problem noticed on RiscPC, which we still
        support, even though we only support ARMv4 there.
      
        (The reason is that the system bus doesn't support ARMv4 half-word
        accesses, so we need the ARMv3 library code for this platform.)
      
        The rest are all quite minor fixes."
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7490/1: Drop duplicate select for GENERIC_IRQ_PROBE
        ARM: Bring back ARMv3 IO and user access code
        ARM: 7489/1: errata: fix workaround for erratum #720789 on UP systems
        ARM: 7488/1: mm: use 5 bits for swapfile type encoding
        ARM: 7487/1: mm: avoid setting nG bit for user mappings that aren't present
        ARM: 7486/1: sched_clock: update epoch_cyc on resume
        ARM: 7484/1: Don't enable GENERIC_LOCKBREAK with ticket spinlocks
        ARM: 7483/1: vfp: only advertise VFPv4 in hwcaps if CONFIG_VFPv3 is enabled
        ARM: 7482/1: topology: fix section mismatch warning for init_cpu_topology
      6dab7ede
    • Andi Kleen's avatar
      64f50307
    • Linus Torvalds's avatar
      Merge tag 'pm-for-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · d9ec0fdc
      Linus Torvalds authored
      Pull power management fixes from Rafael J. Wysocki:
        - Fixes for three obscure problems in the runtime PM core code found
         recently.
       - Two fixes for the new "coupled" cpuidle code from Colin Cross and Jon
         Medhurst.
       - intel_idle driver fix from Konrad Rzeszutek Wilk.
      
      * tag 'pm-for-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        intel_idle: Check cpu_idle_get_driver() for NULL before dereferencing it.
        cpuidle: Prevent null pointer dereference in cpuidle_coupled_cpu_notify
        cpuidle: coupled: fix sleeping while atomic in cpu notifier
        PM / Runtime: Check device PM QoS setting before "no callbacks" check
        PM / Runtime: Clear power.deferred_resume on success in rpm_suspend()
        PM / Runtime: Fix rpm_resume() return value for power.no_callbacks set
      d9ec0fdc
    • Mike Frysinger's avatar
      x32: Use compat shims for {g,s}etsockopt · 515c7af8
      Mike Frysinger authored
      Some of the arguments to {g,s}etsockopt are passed in userland pointers.
      If we try to use the 64bit entry point, we end up sometimes failing.
      
      For example, dhcpcd doesn't run in x32:
      	# dhcpcd eth0
      	dhcpcd[1979]: version 5.5.6 starting
      	dhcpcd[1979]: eth0: broadcasting for a lease
      	dhcpcd[1979]: eth0: open_socket: Invalid argument
      	dhcpcd[1979]: eth0: send_raw_packet: Bad file descriptor
      
      The code in particular is getting back EINVAL when doing:
      	struct sock_fprog pf;
      	setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, &pf, sizeof(pf));
      
      Diving into the kernel code, we can see:
      include/linux/filter.h:
      	struct sock_fprog {
      		unsigned short len;
      		struct sock_filter __user *filter;
      	};
      
      net/core/sock.c:
      	case SO_ATTACH_FILTER:
      		ret = -EINVAL;
      		if (optlen == sizeof(struct sock_fprog)) {
      			struct sock_fprog fprog;
      
      			ret = -EFAULT;
      			if (copy_from_user(&fprog, optval, sizeof(fprog)))
      				break;
      
      			ret = sk_attach_filter(&fprog, sk);
      		}
      		break;
      
      arch/x86/syscalls/syscall_64.tbl:
      	54 common setsockopt sys_setsockopt
      	55 common getsockopt sys_getsockopt
      
      So for x64, sizeof(sock_fprog) is 16 bytes.  For x86/x32, it's 8 bytes.
      This comes down to the pointer being 32bit for x32, which means we need
      to do structure size translation.  But since x32 comes in directly to
      sys_setsockopt, it doesn't get translated like x86.
      
      After changing the syscall table and rebuilding glibc with the new kernel
      headers, dhcp runs fine in an x32 userland.
      
      Oddly, it seems like Linus noted the same thing during the initial port,
      but I guess that was missed/lost along the way:
      	https://lkml.org/lkml/2011/8/26/452
      
      [ hpa: tagging for -stable since this is an ABI fix. ]
      
      Bugzilla: https://bugs.gentoo.org/423649Reported-by: default avatarMads <mads@ab3.no>
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Link: http://lkml.kernel.org/r/1345320697-15713-1-git-send-email-vapier@gentoo.org
      Cc: H. J. Lu <hjl.tools@gmail.com>
      Cc: <stable@vger.kernel.org> v3.4..v3.5
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      515c7af8
    • Linus Torvalds's avatar
      Merge branch 'vfs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · 20fb1936
      Linus Torvalds authored
      Pull vfs fixes from Miklos Szeredi.
      
      This mainly fixes some confusion about whether the open 'mode' variable
      passed around should contain the full file type (S_IFREG etc)
      information or just the permission mode.  In particular, the lack of
      proper file type information had confused fuse.
      
      * 'vfs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        vfs: fix propagation of atomic_open create error on negative dentry
        fuse: check create mode in atomic open
        vfs: pass right create mode to may_o_create()
        vfs: atomic_open(): fix create mode usage
        vfs: canonicalize create mode in build_open_flags()
      20fb1936
    • Sven Schnelle's avatar
      USB: CDC ACM: Fix NULL pointer dereference · 99f347ca
      Sven Schnelle authored
      If a device specifies zero endpoints in its interface descriptor,
      the kernel oopses in acm_probe(). Even though that's clearly an
      invalid descriptor, we should test wether we have all endpoints.
      This is especially bad as this oops can be triggered by just
      plugging a USB device in.
      Signed-off-by: default avatarSven Schnelle <svens@stackframe.org>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      99f347ca
    • Greg Kroah-Hartman's avatar
      USB: emi62: remove __devinit* from the struct usb_device_id table · 83957df2
      Greg Kroah-Hartman authored
      This structure needs to always stick around, even if CONFIG_HOTPLUG
      is disabled, otherwise we can oops when trying to probe a device that
      was added after the structure is thrown away.
      
      Thanks to Fengguang Wu and Bjørn Mork for tracking this issue down.
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Reported-by: default avatarBjørn Mork <bjorn@mork.no>
      Cc: stable <stable@vger.kernel.org>
      CC: Paul Gortmaker <paul.gortmaker@windriver.com>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Felipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      83957df2
    • Greg Kroah-Hartman's avatar
      USB: winbond: remove __devinit* from the struct usb_device_id table · 43a34695
      Greg Kroah-Hartman authored
      This structure needs to always stick around, even if CONFIG_HOTPLUG
      is disabled, otherwise we can oops when trying to probe a device that
      was added after the structure is thrown away.
      
      Thanks to Fengguang Wu and Bjørn Mork for tracking this issue down.
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Reported-by: default avatarBjørn Mork <bjorn@mork.no>
      Cc: stable <stable@vger.kernel.org>
      CC: Pavel Machek <pavel@ucw.cz>
      CC: Paul Gortmaker <paul.gortmaker@windriver.com>
      CC: "John W. Linville" <linville@tuxdriver.com>
      CC: Eliad Peller <eliad@wizery.com>
      CC: Devendra Naga <devendra.aaru@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      43a34695
    • Greg Kroah-Hartman's avatar
      USB: vt6656: remove __devinit* from the struct usb_device_id table · 4d088876
      Greg Kroah-Hartman authored
      This structure needs to always stick around, even if CONFIG_HOTPLUG
      is disabled, otherwise we can oops when trying to probe a device that
      was added after the structure is thrown away.
      
      Thanks to Fengguang Wu and Bjørn Mork for tracking this issue down.
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Reported-by: default avatarBjørn Mork <bjorn@mork.no>
      Cc: stable <stable@vger.kernel.org>
      CC: Forest Bond <forest@alittletooquiet.net>
      CC: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Jesper Juhl <jj@chaosbits.net>
      CC: Jiri Pirko <jpirko@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4d088876
    • Greg Kroah-Hartman's avatar
      USB: rtl8187: remove __devinit* from the struct usb_device_id table · a3433179
      Greg Kroah-Hartman authored
      This structure needs to always stick around, even if CONFIG_HOTPLUG
      is disabled, otherwise we can oops when trying to probe a device that
      was added after the structure is thrown away.
      
      Thanks to Fengguang Wu and Bjørn Mork for tracking this issue down.
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Reported-by: default avatarBjørn Mork <bjorn@mork.no>
      Cc: stable <stable@vger.kernel.org>
      CC: Herton Ronaldo Krzesinski <herton@canonical.com>
      CC: Hin-Tak Leung <htl10@users.sourceforge.net>
      CC: Larry Finger <Larry.Finger@lwfinger.net>
      CC: "John W. Linville" <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a3433179