1. 06 11月, 2014 1 次提交
    • P
      serial: Fix divide-by-zero fault in uart_get_divisor() · 547039ec
      Peter Hurley 提交于
      uart_get_baud_rate() will return baud == 0 if the max rate is set
      to the "magic" 38400 rate and the SPD_* flags are also specified.
      On the first iteration, if the current baud rate is higher than the
      max, the baud rate is clamped at the max (which in the degenerate
      case is 38400). On the second iteration, the now-"magic" 38400 baud
      rate selects the possibly higher alternate baud rate indicated by
      the SPD_* flag. Since only two loop iterations are performed, the
      loop is exited, a kernel WARNING is generated and a baud rate of
      0 is returned.
      
      Reproducible with:
       setserial /dev/ttyS0 spd_hi base_baud 38400
      
      Only perform the "magic" 38400 -> SPD_* baud transform on the first
      loop iteration, which prevents the degenerate case from recognizing
      the clamped baud rate as the "magic" 38400 value.
      Reported-by: NRobert Święcki <robert@swiecki.net>
      Cc: <stable@vger.kernel.org> # all
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      547039ec
  2. 16 10月, 2014 2 次提交
  3. 03 10月, 2014 1 次提交
  4. 29 9月, 2014 12 次提交
  5. 27 9月, 2014 5 次提交
  6. 24 9月, 2014 5 次提交
  7. 23 9月, 2014 1 次提交
  8. 20 9月, 2014 1 次提交
  9. 19 9月, 2014 1 次提交
  10. 11 9月, 2014 2 次提交
  11. 10 9月, 2014 4 次提交
  12. 09 9月, 2014 5 次提交