1. 20 Oct, 2018 1 commit
  2. 04 Oct, 2018 3 commits
  3. 26 Sep, 2018 3 commits
  4. 15 Sep, 2018 3 commits
  5. 05 Sep, 2018 1 commit
    • Guenter Roeck's avatar
      media: staging: omap4iss: Include asm/cacheflush.h after generic includes · 1875957f
      Guenter Roeck authored
      [ Upstream commit 0894da84 ]
      
      Including asm/cacheflush.h first results in the following build error
      when trying to build sparc32:allmodconfig, because 'struct page' has not
      been declared, and the function declaration ends up creating a separate
      (private) declaration of struct page (as a result of function arguments
      being in the scope of the function declaration and definition, not in
      global scope).
      
      The C scoping rules do not just affect variable visibility, they also
      affect type declaration visibility.
      
      The end result is that when the actual call site is seen in
      <linux/highmem.h>, the 'struct page' type in the caller is not the same
      'struct page' that the function was declared with, resulting in:
      
        In file included from arch/sparc/include/asm/page.h:10:0,
                         ...
                         from drivers/staging/media/omap4iss/iss_video.c:15:
        include/linux/highmem.h: In function 'clear_user_highpage':
        include/linux/highmem.h:137:31: error:
      	passing argument 1 of 'sparc_flush_page_to_ram' from incompatible
      	pointer type
      
      Include generic includes files first to fix the problem.
      
      Fixes: fc96d58c ("[media] v4l: omap4iss: Add support for OMAP4 camera interface - Video devices")
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      [ Added explanation of C scope rules - Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1875957f
  6. 24 Aug, 2018 1 commit
  7. 03 Aug, 2018 7 commits
    • Mauro Carvalho Chehab's avatar
      media: atomisp: compat32: fix __user annotations · 98121d66
      Mauro Carvalho Chehab authored
      [ Upstream commit ad4222a0 ]
      
      The __user annotations at the compat32 code is not right:
      
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:81:18: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:81:18:    expected void *base
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:81:18:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:232:23: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:232:23:    expected unsigned int [usertype] *xcoords_y
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:232:23:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:233:23: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:233:23:    expected unsigned int [usertype] *ycoords_y
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:233:23:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:234:24: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:234:24:    expected unsigned int [usertype] *xcoords_uv
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:234:24:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:235:24: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:235:24:    expected unsigned int [usertype] *ycoords_uv
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:235:24:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:296:29: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:296:29:    expected unsigned int [usertype] *effective_width
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:296:29:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:360:29: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:360:29:    expected unsigned int [usertype] *effective_width
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:360:29:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:437:19: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:437:19:    expected struct v4l2_framebuffer *frame
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:437:19:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:481:29: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:481:29:    expected unsigned short *calb_grp_values
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:481:29:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:701:39: warning: cast removes address space of expression
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:704:21: warning: incorrect type in argument 1 (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:704:21:    expected void const volatile [noderef] <asn:1>*<noident>
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:704:21:    got unsigned int [usertype] *src
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:737:43: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:737:43:    expected struct atomisp_shading_table *shading_table
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:737:43:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:742:44: warning: incorrect type in argument 1 (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:742:44:    expected void [noderef] <asn:1>*to
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:742:44:    got struct atomisp_shading_table *shading_table
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:755:41: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:755:41:    expected struct atomisp_morph_table *morph_table
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:755:41:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:760:44: warning: incorrect type in argument 1 (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:760:44:    expected void [noderef] <asn:1>*to
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:760:44:    got struct atomisp_morph_table *morph_table
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:772:40: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:772:40:    expected struct atomisp_dvs2_coefficients *dvs2_coefs
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:772:40:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:777:44: warning: incorrect type in argument 1 (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:777:44:    expected void [noderef] <asn:1>*to
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:777:44:    got struct atomisp_dvs2_coefficients *dvs2_coefs
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:788:46: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:788:46:    expected struct atomisp_dvs_6axis_config *dvs_6axis_config
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:788:46:    got void [noderef] <asn:1>*
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:793:44: warning: incorrect type in argument 1 (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:793:44:    expected void [noderef] <asn:1>*to
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:793:44:    got struct atomisp_dvs_6axis_config *dvs_6axis_config
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:853:17: warning: incorrect type in assignment (different address spaces)
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:853:17:    expected struct atomisp_sensor_ae_bracketing_lut_entry *lut
         drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:853:17:    got void [noderef] <asn:1>*
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      98121d66
    • NeilBrown's avatar
      staging: lustre: ldlm: free resource when ldlm_lock_create() fails. · 41e1f1fe
      NeilBrown authored
      [ Upstream commit d8caf662 ]
      
      ldlm_lock_create() gets a resource, but don't put it on
      all failure paths. It should.
      Signed-off-by: default avatarNeilBrown <neilb@suse.com>
      Reviewed-by: default avatarJames Simmons <jsimmons@infradead.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      41e1f1fe
    • James Simmons's avatar
      staging: lustre: llite: correct removexattr detection · e906355a
      James Simmons authored
      [ Upstream commit 1b60f6df ]
      
      In ll_xattr_set_common() detect the removexattr() case correctly by
      testing for a NULL value as well as XATTR_REPLACE.
      Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
      Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10787
      Reviewed-on: https://review.whamcloud.com/Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
      Reviewed-by: default avatarJames Simmons <uja.ornl@yahoo.com>
      Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e906355a
    • Stefan Wahren's avatar
      staging: vchiq_core: Fix missing semaphore release in error case · fea5a0d8
      Stefan Wahren authored
      [ Upstream commit 8113b89f ]
      
      The bail out branch in case of a invalid tx_pos missed a semaphore
      release. Dan Carpenter found this with a static checker.
      
      Fixes: d1eab9de ("staging: vchiq_core: Bail out in case of invalid tx_pos")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fea5a0d8
    • Doug Oucharek's avatar
      staging: lustre: o2iblnd: Fix FastReg map/unmap for MLX5 · 66eb9942
      Doug Oucharek authored
      [ Upstream commit 24d4b7c8 ]
      
      The FastReg support in ko2iblnd was not unmapping pool items
      causing the items to leak.  In addition, the mapping code
      is not growing the pool like we do with FMR.
      
      This patch makes sure we are unmapping FastReg pool elements
      when we are done with them.  It also makes sure the pool
      will grow when we depleat the pool.
      Signed-off-by: default avatarDoug Oucharek <doug.s.oucharek@intel.com>
      Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9472
      Reviewed-on: https://review.whamcloud.com/27015Reviewed-by: default avatarAndrew Perepechko <andrew.perepechko@seagate.com>
      Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
      Reviewed-by: default avatarJames Simmons <uja.ornl@yahoo.com>
      Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
      Signed-off-by: default avatarDoug Oucharek <dougso@me.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      66eb9942
    • Doug Oucahrek's avatar
      staging: lustre: o2iblnd: fix race at kiblnd_connect_peer · 52a21fca
      Doug Oucahrek authored
      [ Upstream commit cf04968e ]
      
      cmid will be destroyed at OFED if kiblnd_cm_callback return error.
      if error happen before the end of kiblnd_connect_peer, it will touch
      destroyed cmid and fail as
      (o2iblnd_cb.c:1315:kiblnd_connect_peer())
                  ASSERTION( cmid->device != ((void *)0) ) failed:
      Signed-off-by: default avatarAlexander Boyko <alexander.boyko@seagate.com>
      Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10015Reviewed-by: default avatarAlexey Lyashkov <c17817@cray.com>
      Reviewed-by: default avatarDoug Oucharek <dougso@me.com>
      Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
      Signed-off-by: default avatarDoug Oucharek <dougso@me.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      52a21fca
    • Mauro Carvalho Chehab's avatar
      media: atomisp: ov2680: don't declare unused vars · 62a87c87
      Mauro Carvalho Chehab authored
      [ Upstream commit e5c0680f ]
      
      drivers/staging/media/atomisp/i2c/atomisp-ov2680.c: In function ‘__ov2680_set_exposure’:
      drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:400:10: warning: variable ‘hts’ set but not used [-Wunused-but-set-variable]
        u16 vts,hts;
                ^~~
      drivers/staging/media/atomisp/i2c/atomisp-ov2680.c: In function ‘ov2680_detect’:
      drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:1164:5: warning: variable ‘revision’ set but not used [-Wunused-but-set-variable]
        u8 revision;
           ^~~~~~~~
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      62a87c87
  8. 28 Jul, 2018 1 commit
  9. 17 Jul, 2018 2 commits
  10. 11 Jul, 2018 1 commit
  11. 08 Jul, 2018 1 commit
  12. 16 Jun, 2018 1 commit
  13. 25 May, 2018 6 commits
    • NeilBrown's avatar
      staging: lustre: lmv: correctly iput lmo_root · 43624647
      NeilBrown authored
      [ Upstream commit 17556cdb ]
      
      Commit 8f18c8a4 ("staging: lustre: lmv: separate master object
      with master stripe") changed how lmo_root inodes were managed,
      particularly when LMV_HASH_FLAG_MIGRATION is not set.
      Previously lsm_md_oinfo[0].lmo_root was always a borrowed
      inode reference and didn't need to by iput().
      Since the change, that special case only applies when
      LMV_HASH_FLAG_MIGRATION is set
      
      In the upstream (lustre-release) version of this patch [Commit
      60e07b972114 ("LU-4690 lod: separate master object with master
      stripe")] the for loop in the lmv_unpack_md() was changed to count
      from 0 and to ignore entry 0 if LMV_HASH_FLAG_MIGRATION is set.
      In the patch that got applied to Linux, that change was missing,
      so lsm_md_oinfo[0].lmo_root is never iput().
      This results in a "VFS: Busy inodes" warning at unmount.
      
      Fixes: 8f18c8a4 ("staging: lustre: lmv: separate master object with master stripe")
      Signed-off-by: default avatarNeilBrown <neilb@suse.com>
      Reviewed-by: default avatarJames Simmons <jsimmons@infradead.org>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      43624647
    • Quytelda Kahja's avatar
      staging: ks7010: Use constants from ieee80211_eid instead of literal ints. · 281bb792
      Quytelda Kahja authored
      [ Upstream commit dc13498a ]
      
      The case statement in get_ap_information() should not use literal integers
      to parse information element IDs when these values are provided by name
      in 'enum ieee80211_eid' in the header 'linux/ieee80211.h'.
      Signed-off-by: default avatarQuytelda Kahja <quytelda@tamalin.org>
      Reviewed-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      281bb792
    • Colin Ian King's avatar
      staging: rtl8192u: return -ENOMEM on failed allocation of priv->oldaddr · d5ae597e
      Colin Ian King authored
      [ Upstream commit e1a74185 ]
      
      Currently the allocation of priv->oldaddr is not null checked which will
      lead to subsequent errors when accessing priv->oldaddr.  Fix this with
      a null pointer check and a return of -ENOMEM on allocation failure.
      
      Detected with Coccinelle:
      drivers/staging/rtl8192u/r8192U_core.c:1708:2-15: alloc with no test,
      possible model on line 1723
      
      Fixes: 8fc8598e ("Staging: Added Realtek rtl8192u driver to staging")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d5ae597e
    • Ioana Radulescu's avatar
      staging: fsl-dpaa2/eth: Fix incorrect casts · 20b9506d
      Ioana Radulescu authored
      [ Upstream commit 75c583ab ]
      
      The DPAA2 Ethernet driver incorrectly assumes virtual addresses
      are always 64b long, which causes compiler errors when building
      for a 32b platform.
      
      Fix this by using explicit casts to uintptr_t where necessary.
      Signed-off-by: default avatarIoana Radulescu <ruxandra.radulescu@nxp.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      20b9506d
    • NeilBrown's avatar
      staging: lustre: fix bug in osc_enter_cache_try · ff8eb22e
      NeilBrown authored
      [ Upstream commit 2fab9faf ]
      
      The lustre-release patch commit bdc5bb52c554 ("LU-4933 osc:
      Automatically increase the max_dirty_mb") changed
      
      -       if (cli->cl_dirty + PAGE_CACHE_SIZE <= cli->cl_dirty_max &&
      +       if (cli->cl_dirty_pages < cli->cl_dirty_max_pages &&
      
      When this patch landed in Linux a couple of years later, it landed as
      
      -       if (cli->cl_dirty + PAGE_SIZE <= cli->cl_dirty_max &&
      +       if (cli->cl_dirty_pages <= cli->cl_dirty_max_pages &&
      
      which is clearly different ('<=' vs '<'), and allows cl_dirty_pages to
      increase beyond cl_dirty_max_pages - which causes a latter assertion
      to fails.
      
      Fixes: 3147b268 ("staging: lustre: osc: Automatically increase the max_dirty_mb")
      Signed-off-by: default avatarNeilBrown <neilb@suse.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ff8eb22e
    • Kirill Marinushkin's avatar
      staging: bcm2835-audio: Release resources on module_exit() · bf30d269
      Kirill Marinushkin authored
      [ Upstream commit 626118b4 ]
      
      In the current implementation, `rmmod snd_bcm2835` does not release
      resources properly. It causes an oops when trying to list sound devices.
      
      This commit fixes it.
      
      The details WRT allocation / free are described below.
      
      Device structure WRT allocation:
      
      pdev
        \childdev[]
          \card
            \chip
              \pcm
              \ctl
      
      Allocation / register sequence:
      
      * childdev: devm_kzalloc      - freed during driver detach
      * childdev: device_initialize - freed during device_unregister
      * pdev: devres_alloc          - freed during driver detach
      * childdev: device_add        - removed during device_unregister
      * pdev, childdev: devres_add  - freed during driver detach
      * card: snd_card_new          - freed during snd_card_free
      * chip: kzalloc               - freed during kfree
      * card, chip: snd_device_new  - freed during snd_device_free
      * chip: new_pcm               - TODO: free pcm
      * chip: new_ctl               - TODO: free ctl
      * card: snd_card_register     - unregistered during snd_card_free
      
      Free / unregister sequence:
      
      * card: snd_card_free
      * card, chip: snd_device_free
      * childdev: device_unregister
      * chip: kfree
      
      Steps to reproduce the issue before this commit:
      
      ~~~~
      $ rmmod snd_bcm2835
      $ aplay -L
      [  138.648130] Unable to handle kernel paging request at virtual address 7f1343c0
      [  138.660415] pgd = ad8f0000
      [  138.665567] [7f1343c0] *pgd=3864c811, *pte=00000000, *ppte=00000000
      [  138.674887] Internal error: Oops: 7 [#1] SMP ARM
      [  138.683571] Modules linked in: sha256_generic cfg80211 rfkill snd_pcm snd_timer
       snd fixed uio_pdrv_genirq uio ip_tables x_tables ipv6 [last unloaded: snd_bcm2835
      ]
      [  138.706594] CPU: 3 PID: 463 Comm: aplay Tainted: G        WC       4.15.0-rc1-v
      7+ #6
      [  138.719833] Hardware name: BCM2835
      [  138.726016] task: b877ac00 task.stack: aebec000
      [  138.733408] PC is at try_module_get+0x38/0x24c
      [  138.740813] LR is at snd_ctl_open+0x58/0x194 [snd]
      [  138.748485] pc : [<801c4d5c>]    lr : [<7f0e6b2c>]    psr: 20000013
      [  138.757709] sp : aebedd60  ip : aebedd88  fp : aebedd84
      [  138.765884] r10: 00000000  r9 : 00000004  r8 : 7f0ed440
      [  138.774040] r7 : b7e469b0  r6 : 7f0e6b2c  r5 : afd91900  r4 : 7f1343c0
      [  138.783571] r3 : aebec000  r2 : 00000001  r1 : b877ac00  r0 : 7f1343c0
      [  138.793084] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      [  138.803300] Control: 10c5387d  Table: 2d8f006a  DAC: 00000055
      [  138.812064] Process aplay (pid: 463, stack limit = 0xaebec210)
      [  138.820868] Stack: (0xaebedd60 to 0xaebee000)
      [  138.828207] dd60: 00000000 b848d000 afd91900 00000000 b7e469b0 7f0ed440 aebedda4 aebedd88
      [  138.842371] dd80: 7f0e6b2c 801c4d30 afd91900 7f0ea4dc 00000000 b7e469b0 aebeddcc aebedda8
      [  138.856611] dda0: 7f0e250c 7f0e6ae0 7f0e2464 b8478ec0 b7e469b0 afd91900 7f0ea388 00000000
      [  138.870864] ddc0: aebeddf4 aebeddd0 802ce590 7f0e2470 8090ab64 afd91900 afd91900 b7e469b0
      [  138.885301] dde0: afd91908 802ce4e4 aebede1c aebeddf8 802c57b4 802ce4f0 afd91900 aebedea8
      [  138.900110] de00: b7fa4c00 00000000 00000000 00000004 aebede3c aebede20 802c6ba8 802c56b4
      [  138.915260] de20: aebedea8 00000000 aebedf5c 00000000 aebedea4 aebede40 802d9a68 802c6b58
      [  138.930661] de40: b874ddd0 00000000 00000000 00000001 00000041 00000000 afd91900 aebede70
      [  138.946402] de60: 00000000 00000000 00000002 b7e469b0 b8a87610 b8d6ab80 801852f8 00080000
      [  138.962314] de80: aebedf5c aebedea8 00000001 80108464 aebec000 00000000 aebedf4c aebedea8
      [  138.978414] dea0: 802dacd4 802d970c b8a87610 b8d6ab80 a7982bc6 00000009 af363019 b9231480
      [  138.994617] dec0: 00000000 b8c038a0 b7e469b0 00000101 00000002 00000238 00000000 00000000
      [  139.010823] dee0: 00000000 aebedee8 00080000 0000000f aebedf3c aebedf00 802ed7e4 80843f94
      [  139.027025] df00: 00000003 00080000 b9231490 b9231480 00000000 00080000 af363000 00000000
      [  139.043229] df20: 00000005 00000002 ffffff9c 00000000 00080000 ffffff9c af363000 00000003
      [  139.059430] df40: aebedf94 aebedf50 802c6f70 802dac70 aebec000 00000000 00000001 00000000
      [  139.075629] df60: 00020000 00000004 00000100 00000001 7ebe577c 0002e038 00000000 00000005
      [  139.091828] df80: 80108464 aebec000 aebedfa4 aebedf98 802c7060 802c6e6c 00000000 aebedfa8
      [  139.108025] dfa0: 801082c0 802c7040 7ebe577c 0002e038 7ebe577c 00080000 00000b98 e81c8400
      [  139.124222] dfc0: 7ebe577c 0002e038 00000000 00000005 7ebe57e4 00a20af8 7ebe57f0 76f87394
      [  139.140419] dfe0: 00000000 7ebe55c4 76ec88e8 76df1d9c 60000010 7ebe577c 00000000 00000000
      [  139.156715] [<801c4d5c>] (try_module_get) from [<7f0e6b2c>] (snd_ctl_open+0x58/0x194 [snd])
      [  139.173222] [<7f0e6b2c>] (snd_ctl_open [snd]) from [<7f0e250c>] (snd_open+0xa8/0x14c [snd])
      [  139.189683] [<7f0e250c>] (snd_open [snd]) from [<802ce590>] (chrdev_open+0xac/0x188)
      [  139.205465] [<802ce590>] (chrdev_open) from [<802c57b4>] (do_dentry_open+0x10c/0x314)
      [  139.221347] [<802c57b4>] (do_dentry_open) from [<802c6ba8>] (vfs_open+0x5c/0x88)
      [  139.236788] [<802c6ba8>] (vfs_open) from [<802d9a68>] (path_openat+0x368/0x944)
      [  139.248270] [<802d9a68>] (path_openat) from [<802dacd4>] (do_filp_open+0x70/0xc4)
      [  139.263731] [<802dacd4>] (do_filp_open) from [<802c6f70>] (do_sys_open+0x110/0x1d4)
      [  139.279378] [<802c6f70>] (do_sys_open) from [<802c7060>] (SyS_open+0x2c/0x30)
      [  139.290647] [<802c7060>] (SyS_open) from [<801082c0>] (ret_fast_syscall+0x0/0x28)
      [  139.306021] Code: e3c3303f e5932004 e2822001 e5832004 (e5943000)
      [  139.316265] ---[ end trace 7f3f7f6193b663ed ]---
      [  139.324956] note: aplay[463] exited with preempt_count 1
      ~~~~
      Signed-off-by: default avatarKirill Marinushkin <k.marinushkin@gmail.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Stefan Wahren <stefan.wahren@i2se.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Ray Jui <rjui@broadcom.com>
      Cc: Scott Branden <sbranden@broadcom.com>
      Cc: bcm-kernel-feedback-list@broadcom.com
      Cc: Michael Zoran <mzoran@crowfest.net>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: linux-rpi-kernel@lists.infradead.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: devel@driverdev.osuosl.org
      Cc: linux-kernel@vger.kernel.org
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bf30d269
  14. 26 Apr, 2018 1 commit
  15. 24 Apr, 2018 3 commits
    • Sean Young's avatar
      media: staging: lirc_zilog: incorrect reference counting · 071ff203
      Sean Young authored
      [not upstream as the driver is deleted in 4.16 - gregkh]
      
      Whenever poll is called, the reference count is increased but never
      decreased. This means that on rmmod, the lirc_thread is not stopped,
      and will trample over freed memory.
      
      Zilog/Hauppauge IR driver unloaded
      BUG: unable to handle kernel paging request at ffffffffc17ba640
      Oops: 0010 [#1] SMP
      CPU: 1 PID: 667 Comm: zilog-rx-i2c-1 Tainted: P         C OE   4.13.16-302.fc27.x86_64 #1
      Hardware name: Gigabyte Technology Co., Ltd. GA-MA790FXT-UD5P/GA-MA790FXT-UD5P, BIOS F6 08/06/2009
      task: ffff964eb452ca00 task.stack: ffffb254414dc000
      RIP: 0010:0xffffffffc17ba640
      RSP: 0018:ffffb254414dfe78 EFLAGS: 00010286
      RAX: 0000000000000000 RBX: ffff964ec1b35890 RCX: 0000000000000000
      RDX: 0000000000000000 RSI: 0000000000000246 RDI: 0000000000000246
      RBP: ffffb254414dff00 R08: 000000000000036e R09: ffff964ecfc8dfd0
      R10: ffffb254414dfe78 R11: 00000000000f4240 R12: ffff964ec2bf28a0
      R13: ffff964ec1b358a8 R14: ffff964ec1b358d0 R15: ffff964ec1b35800
      FS:  0000000000000000(0000) GS:ffff964ecfc80000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: ffffffffc17ba640 CR3: 000000023058c000 CR4: 00000000000006e0
      Call Trace:
       kthread+0x125/0x140
       ? kthread_park+0x60/0x60
       ? do_syscall_64+0x67/0x140
       ret_from_fork+0x25/0x30
      Code:  Bad RIP value.
      RIP: 0xffffffffc17ba640 RSP: ffffb254414dfe78
      CR2: ffffffffc17ba640
      
      Note that zilog-rx-i2c-1 should have exited by now, but hasn't due to
      the missing put in poll().
      
      This code has been replaced completely in kernel v4.16 by a new driver,
      see commit acaa34bf ("media: rc: implement zilog transmitter"), and
      commit f95367a7 ("media: staging: remove lirc_zilog driver").
      
      Cc: stable@vger.kernel.org # v4.15- (all up to and including v4.15)
      Reported-by: default avatarWarren Sturm <warren.sturm@gmail.com>
      Tested-by: default avatarWarren Sturm <warren.sturm@gmail.com>
      Signed-off-by: default avatarSean Young <sean@mess.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      071ff203
    • Sean Young's avatar
      Revert "media: lirc_zilog: driver only sends LIRCCODE" · e7a08ffb
      Sean Young authored
      [not upstream as the driver is deleted in 4.16 - gregkh]
      
      The lirc config documented here
      https://www.blushingpenguin.com/mark/blog/?p=24 uses raw_codes for sending
      IR. Each key only has one pulse, which in fact is an index into the
      haup-ir-blaster.bin file. Changing the driver to LIRCCODE (although more
      accurate) breaks this configuration.
      
      This code has been replaced completely in kernel v4.16 by a new driver,
      see commit acaa34bf ("media: rc: implement zilog transmitter"), and
      commit f95367a7 ("media: staging: remove lirc_zilog driver").
      
      This reverts commit 89d8a2cc.
      
      Fixes: 615cd3fe ("[media] media: lirc_dev: make better use of file->private_data")
      
      Cc: stable@vger.kernel.org # v4.14-v4.15
      Reported-by: default avatarWarren Sturm <warren.sturm@gmail.com>
      Tested-by: default avatarWarren Sturm <warren.sturm@gmail.com>
      Signed-off-by: default avatarSean Young <sean@mess.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e7a08ffb
    • Hans Verkuil's avatar
      media: atomisp_fops.c: disable atomisp_compat_ioctl32 · 9864a1ef
      Hans Verkuil authored
      commit 57e6b6f2 upstream.
      
      The atomisp_compat_ioctl32() code has problems. This patch disables the
      compat_ioctl32 support until those issues have been fixed.
      
      Contact Sakari or me for more details.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Cc: <stable@vger.kernel.org>      # for v4.12 and up
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9864a1ef
  16. 12 Apr, 2018 1 commit
  17. 08 Apr, 2018 1 commit
  18. 28 Mar, 2018 2 commits
  19. 24 Mar, 2018 1 commit