1. 15 2月, 2017 1 次提交
  2. 08 2月, 2017 1 次提交
  3. 03 2月, 2017 1 次提交
  4. 25 12月, 2016 1 次提交
  5. 09 12月, 2016 1 次提交
  6. 03 11月, 2016 2 次提交
  7. 27 10月, 2016 2 次提交
    • J
      tty: vgacon+sisusb, move scrolldelta to a common helper · 35cc56f9
      Jiri Slaby 提交于
      The code is mirrorred in scrolldelta implementations of both vgacon
      and sisusb. Let's move the code to a separate helper where we will
      perform a common cleanup and further changes.
      
      While we are moving the code, make it linear and save one indentation
      level. This is done by returning from the "!lines" then-branch
      immediatelly. This allows flushing the else-branch 1 level to the
      left, obviously.
      
      Few more new lines and comments were added too.
      
      And do not forget to export the helper function given sisusb can be
      built as module.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: <linux-fbdev@vger.kernel.org>
      Cc: <linux-usb@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      35cc56f9
    • J
      tty: vt, cleanup and document con_scroll · d705ff38
      Jiri Slaby 提交于
      Scrolling helpers scrup and scrdown both accept 'top' and 'bottom' as
      unsigned int. Number of lines 'nr' is accepted as int, but all callers
      pass down unsigned too. So change the type of 'nr' to unsigned too.
      Now, promote unsigned int from the helpers up to the con_scroll
      hook which actually accepted all those as signed int.
      
      Next, the 'dir' parameter can have only two values and we define
      constants for that: SM_UP and SM_DOWN. Switch them to enum and do
      proper type checking on 'dir' too.
      
      Finally, document the behaviour of the hook.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: <linux-fbdev@vger.kernel.org>
      Cc: <linux-usb@vger.kernel.org>
      Cc: <linux-parisc@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d705ff38
  8. 24 10月, 2016 1 次提交
  9. 22 9月, 2016 1 次提交
    • G
      usb: misc: legousbtower: Fix NULL pointer deference · 2fae9e5a
      Greg Kroah-Hartman 提交于
      This patch fixes a NULL pointer dereference caused by a race codition in
      the probe function of the legousbtower driver. It re-structures the
      probe function to only register the interface after successfully reading
      the board's firmware ID.
      
      The probe function does not deregister the usb interface after an error
      receiving the devices firmware ID. The device file registered
      (/dev/usb/legousbtower%d) may be read/written globally before the probe
      function returns. When tower_delete is called in the probe function
      (after an r/w has been initiated), core dev structures are deleted while
      the file operation functions are still running. If the 0 address is
      mappable on the machine, this vulnerability can be used to create a
      Local Priviege Escalation exploit via a write-what-where condition by
      remapping dev->interrupt_out_buffer in tower_write. A forged USB device
      and local program execution would be required for LPE. The USB device
      would have to delay the control message in tower_probe and accept
      the control urb in tower_open whilst guest code initiated a write to the
      device file as tower_delete is called from the error in tower_probe.
      
      This bug has existed since 2003. Patch tested by emulated device.
      Reported-by: NJames Patrick-Evans <james@jmp-e.com>
      Tested-by: NJames Patrick-Evans <james@jmp-e.com>
      Signed-off-by: NJames Patrick-Evans <james@jmp-e.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2fae9e5a
  10. 13 9月, 2016 1 次提交
    • J
      ezusb: constify local structures · 36ae6776
      Julia Lawall 提交于
      For structure types defined in the same file or local header files, find
      top-level static structure declarations that have the following
      properties:
      1. Never reassigned.
      2. Address never taken
      3. Not passed to a top-level macro call
      4. No pointer or array-typed field passed to a function or stored in a
      variable.
      Declare structures having all of these properties as const.
      
      Done using Coccinelle.
      Based on a suggestion by Joe Perches <joe@perches.com>.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      36ae6776
  11. 31 8月, 2016 15 次提交
  12. 15 8月, 2016 10 次提交
  13. 12 8月, 2016 1 次提交
  14. 11 8月, 2016 1 次提交
  15. 09 8月, 2016 1 次提交
    • B
      usb: ftdi-elan: Remove deprecated create_singlethread_workqueue · c936f45f
      Bhaktipriya Shridhar 提交于
      The status workqueue is involved in initializing the Uxxx and polling
      the Uxxx until a supported PCMCIA CardBus device is detected.
      It then starts the command and respond workqueues and then loads the
      module that handles the device, after which it just polls the Uxxx
      looking for card ejects.
      
      The command and respond workqueues are involved in implementing a command
      sequencer for communicating with the firmware on the other side of
      the FTDI chip in the Uxxx.
      
      These workqueues have only a single work item each and hence they do not
      require ordering. Also, none of the above workqueues are being used on a
      memory recliam path. Hence, the singlethreaded workqueues have been
      replaced with the use of system_wq.
      
      System workqueues have been able to handle high level of concurrency
      for a long time now and hence it's not required to have a singlethreaded
      workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
      created with create_singlethread_workqueue(), system_wq allows multiple
      work items to overlap executions even on the same CPU; however, a
      per-cpu workqueue doesn't have any CPU locality or global ordering
      guarantee unless the target CPU is explicitly specified and thus the
      increase of local concurrency shouldn't make any difference.
      
      The work items have been sync cancelled because they are self-requeueing
      and need to wait for the in-flight work item to finish before proceeding
      with destruction. Hence, they have been sync cancelled in
      ftdi_status_cancel_work(), ftdi_command_cancel_work() and
      ftdi_response_cancel_work(). These functions are called in
      ftdi_elan_exit() to ensure that there are no pending work items while
      disconnecting the driver.
      Signed-off-by: NBhaktipriya Shridhar <bhaktipriya96@gmail.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c936f45f