1. 27 Jun, 2016 2 commits
  2. 26 Jun, 2016 3 commits
    • Andrey Smirnov's avatar
      rtc: rtctest: Change no IRQ detection for RTC_IRQP_SET · 0a553cba
      Andrey Smirnov authored
      A call to ioctl(..., RTC_IRQP_SET, ...) should never result in
      ENOTTY. All new style RTC drivers implement it and all of the old style
      drivers return EINVAL when they don't support periodic IRQs.
      Signed-off-by: default avatarAndrey Smirnov <andrew.smirnov@gmail.com>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      0a553cba
    • Andrey Smirnov's avatar
      rtc: rtctest: Change no IRQ detection for RTC_IRQP_READ · 519efa98
      Andrey Smirnov authored
      A call to ioctl(..., RTC_IRQP_READ, ...) should never result in
      ENOTTY. All new style RTC drivers implement it and all of the old style
      drivers return EINVAL when they don't support periodic IRQs.
      Signed-off-by: default avatarAndrey Smirnov <andrew.smirnov@gmail.com>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      519efa98
    • Andrey Smirnov's avatar
      rtc: rtctest: Change alarm IRQ support detection · cd26fca2
      Andrey Smirnov authored
      For old style drivers, call a call to ioctl(..., RTC_ALM_SET, ...):
      
          - char/ds1302.c will always return -EINVAL
          - char/genrtc.c: will always return -EINVAL
          - char/rtc.c will succeed regardless if IRQs are supported or not
          - char/efirtc.c will always return -EINVAL
          - input/misc/hp_sdc_rtc.c ... that ioctl code is a good lesson about
            ifdefing code out and punting implementation ... and it will
            always return -EINVAL
      
      For new style rtc drivers, a call to ioctl(..., RTC_ALM_SET, ...) never
      results in a call to __rtc_set_alarm, since struct rtc_wkalarm passed to
      rtc_set_alarm has 'enabled' field set to 0. This means that
      rtc->ops->set_alarm driver hook is never called in that ioctl. Since no
      driver code interaction happens as a part of that call, using its
      results to ascertain properties of the driver is not going to work. To
      remedy this - use the result of RTC_AIE_ON to make the judgement.
      
      This patch also changes ENOTTY to EINVAL as an error code value that
      would tell us that IRQs are not supported. There are three reason for
      this:
      
       - As mentioned above old style driver never returns ENOTTY for this
         ioctl
      
       - In it's code __rtc_set_alarm() returns -EINVAL if rtc->ops->set_alarm
         method is not provided by the driver, so one reason for change is to
         be consistent with that code path.
      
       - A call to ioctl(..., RTC_UIE_ON, ...) will result in a call to
         rtc_update_irq_enable() and then __rtc_set_alarm(), which, if IRQs
         are not supported by the driver, will result in a non-zero error
         code. Returning ENOTTY in that case would:
      
         	 a) Not be consistent with other codepaths of
         	 rtc_update_irq_enable, for example the check of
         	 rtc->uie_unsupported
      
      	 b) Would break update IRQ emulation code since that codpath
      	 expects EINVAL
      
      	 c) Would break test's logic for feature support detection in
      	 the case of RTC_UIE_ON ioctl
      Signed-off-by: default avatarAndrey Smirnov <andrew.smirnov@gmail.com>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      cd26fca2
  3. 25 Jun, 2016 3 commits
  4. 06 Jun, 2016 2 commits
  5. 04 Jun, 2016 5 commits
  6. 03 Jun, 2016 16 commits
  7. 29 May, 2016 5 commits
  8. 28 May, 2016 4 commits
    • Mikulas Patocka's avatar
      hpfs: implement the show_options method · 037369b8
      Mikulas Patocka authored
      The HPFS filesystem used generic_show_options to produce string that is
      displayed in /proc/mounts.  However, there is a problem that the options
      may disappear after remount.  If we mount the filesystem with option1
      and then remount it with option2, /proc/mounts should show both option1
      and option2, however it only shows option2 because the whole option
      string is replaced with replace_mount_options in hpfs_remount_fs.
      
      To fix this bug, implement the hpfs_show_options function that prints
      options that are currently selected.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      037369b8
    • Mikulas Patocka's avatar
      affs: fix remount failure when there are no options changed · 01d6e087
      Mikulas Patocka authored
      Commit c8f33d0b ("affs: kstrdup() memory handling") checks if the
      kstrdup function returns NULL due to out-of-memory condition.
      
      However, if we are remounting a filesystem with no change to
      filesystem-specific options, the parameter data is NULL.  In this case,
      kstrdup returns NULL (because it was passed NULL parameter), although no
      out of memory condition exists.  The mount syscall then fails with
      ENOMEM.
      
      This patch fixes the bug.  We fail with ENOMEM only if data is non-NULL.
      
      The patch also changes the call to replace_mount_options - if we didn't
      pass any filesystem-specific options, we don't call
      replace_mount_options (thus we don't erase existing reported options).
      
      Fixes: c8f33d0b ("affs: kstrdup() memory handling")
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org	# v4.1+
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      01d6e087
    • Mikulas Patocka's avatar
      hpfs: fix remount failure when there are no options changed · 44d51706
      Mikulas Patocka authored
      Commit ce657611 ("hpfs: kstrdup() out of memory handling") checks if
      the kstrdup function returns NULL due to out-of-memory condition.
      
      However, if we are remounting a filesystem with no change to
      filesystem-specific options, the parameter data is NULL.  In this case,
      kstrdup returns NULL (because it was passed NULL parameter), although no
      out of memory condition exists.  The mount syscall then fails with
      ENOMEM.
      
      This patch fixes the bug.  We fail with ENOMEM only if data is non-NULL.
      
      The patch also changes the call to replace_mount_options - if we didn't
      pass any filesystem-specific options, we don't call
      replace_mount_options (thus we don't erase existing reported options).
      
      Fixes: ce657611 ("hpfs: kstrdup() out of memory handling")
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      44d51706
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 4029632c
      Linus Torvalds authored
      Pull more MIPS updates from Ralf Baechle:
       "This is the secondnd batch of MIPS patches for 4.7. Summary:
      
        CPS:
         - Copy EVA configuration when starting secondary VPs.
      
        EIC:
         - Clear Status IPL.
      
        Lasat:
         - Fix a few off by one bugs.
      
        lib:
         - Mark intrinsics notrace.  Not only are the intrinsics
           uninteresting, it would cause infinite recursion.
      
        MAINTAINERS:
         - Add file patterns for MIPS BRCM device tree bindings.
         - Add file patterns for mips device tree bindings.
      
        MT7628:
         - Fix MT7628 pinmux typos.
         - wled_an pinmux gpio.
         - EPHY LEDs pinmux support.
      
        Pistachio:
         - Enable KASLR
      
        VDSO:
         - Build microMIPS VDSO for microMIPS kernels.
         - Fix aliasing warning by building with `-fno-strict-aliasing' for
           debugging but also tracing them might result in recursion.
      
        Misc:
         - Add missing FROZEN hotplug notifier transitions.
         - Fix clk binding example for varioius PIC32 devices.
         - Fix cpu interrupt controller node-names in the DT files.
         - Fix XPA CPU feature separation.
         - Fix write_gc0_* macros when writing zero.
         - Add inline asm encoding helpers.
         - Add missing VZ accessor microMIPS encodings.
         - Fix little endian microMIPS MSA encodings.
         - Add 64-bit HTW fields and fix its configuration.
         - Fix sigreturn via VDSO on microMIPS kernel.
         - Lots of typo fixes.
         - Add definitions of SegCtl registers and use them"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (49 commits)
        MIPS: Add missing FROZEN hotplug notifier transitions
        MIPS: Build microMIPS VDSO for microMIPS kernels
        MIPS: Fix sigreturn via VDSO on microMIPS kernel
        MIPS: devicetree: fix cpu interrupt controller node-names
        MIPS: VDSO: Build with `-fno-strict-aliasing'
        MIPS: Pistachio: Enable KASLR
        MIPS: lib: Mark intrinsics notrace
        MIPS: Fix 64-bit HTW configuration
        MIPS: Add 64-bit HTW fields
        MAINTAINERS: Add file patterns for mips device tree bindings
        MAINTAINERS: Add file patterns for mips brcm device tree bindings
        MIPS: Simplify DSP instruction encoding macros
        MIPS: Add missing tlbinvf/XPA microMIPS encodings
        MIPS: Fix little endian microMIPS MSA encodings
        MIPS: Add missing VZ accessor microMIPS encodings
        MIPS: Add inline asm encoding helpers
        MIPS: Spelling fix lets -> let's
        MIPS: VR41xx: Fix typo
        MIPS: oprofile: Fix typo
        MIPS: math-emu: Fix typo
        ...
      4029632c