1. 04 May, 2007 2 commits
    • Marcel Holtmann's avatar
      [Bluetooth] Attach host adapters to the Bluetooth bus · 53c1d4b0
      Marcel Holtmann authored
      The Bluetooth host adapters are attached to the Bluetooth class and the
      low-level connections are children of these class devices. Having class
      devices as parent of bus devices breaks a lot of reasonable assumptions
      about sysfs. The host adapters should be attached to the Bluetooth bus
      to simplify the dependency resolving. For compatibility an additional
      symlink from the Bluetooth class will be used.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      53c1d4b0
    • Marcel Holtmann's avatar
      [Bluetooth] Fix L2CAP and HCI setsockopt() information leaks · 0878b666
      Marcel Holtmann authored
      The L2CAP and HCI setsockopt() implementations have a small information
      leak that makes it possible to leak kernel stack memory to userspace.
      
      If the optlen parameter is 0, no data will be copied by copy_from_user(),
      but the uninitialized stack buffer will be read and stored later. A call
      to getsockopt() can now retrieve the leaked information.
      
      To fix this problem the stack buffer given to copy_from_user() must be
      initialized with the current settings.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      0878b666
  2. 01 May, 2007 1 commit
    • Linus Torvalds's avatar
      libata: honour host controllers that want just one host · dc87c398
      Linus Torvalds authored
      The Marvell IDE interface on my machine would hit a BUG_ON() in
      lib/iomem.c because it was calling ata_pci_init_one() specifying just a
      single port on the host, but that would actually end up trying to
      initialize two ports, the second one with bogus information.
      
      This fixes "ata_pci_init_one()" so that it actually passes down the
      n_ports variable that it got from the low-level driver to the host
      allocation routine ("ata_host_alloc_pinfo()"), which results in the ATA
      layer actually having the correct port number information.
      
      And in order to make it all work, I also needed to fix a few places that
      had incorrectly hard-coded the fact that a host always had exactly two
      ports (both ata_pci_init_bmdma() and ata_request_legacy_irqs() would
      just always iterate over both ports).
      Acked-by: default avatarJeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dc87c398
  3. 30 Apr, 2007 37 commits