1. 21 9月, 2015 1 次提交
    • T
      crypto: marvell - properly handle CRYPTO_TFM_REQ_MAY_BACKLOG-flagged requests · cfcd2271
      Thomas Petazzoni 提交于
      The mv_cesa_queue_req() function calls crypto_enqueue_request() to
      enqueue a request. In the normal case (i.e the queue isn't full), this
      function returns -EINPROGRESS. The current Marvell CESA crypto driver
      takes this into account and cleans up the request only if an error
      occured, i.e if the return value is not -EINPROGRESS.
      
      Unfortunately this causes problems with
      CRYPTO_TFM_REQ_MAY_BACKLOG-flagged requests. When such a request is
      passed to crypto_enqueue_request() and the queue is full,
      crypto_enqueue_request() will return -EBUSY, but will keep the request
      enqueued nonetheless. This situation was not properly handled by the
      Marvell CESA driver, which was anyway cleaning up the request in such
      a situation. When later on the request was taken out of the backlog
      and actually processed, a kernel crash occured due to the internal
      driver data structures for this structure having been cleaned up.
      
      To avoid this situation, this commit adds a
      mv_cesa_req_needs_cleanup() helper function which indicates if the
      request needs to be cleaned up or not after a call to
      crypto_enqueue_request(). This helper allows to do the cleanup only in
      the appropriate cases, and all call sites of mv_cesa_queue_req() are
      fixed to use this new helper function.
      Reported-by: NVincent Donnefort <vdonnefort@gmail.com>
      Fixes: db509a45 ("crypto: marvell/cesa - add TDMA support")
      Cc: <stable@vger.kernel.org> # v4.2+
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Tested-by: NVincent Donnefort <vdonnefort@gmail.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      cfcd2271
  2. 14 7月, 2015 1 次提交
  3. 01 7月, 2015 1 次提交
    • V
      genalloc: rename of_get_named_gen_pool() to of_gen_pool_get() · abdd4a70
      Vladimir Zapolskiy 提交于
      To be consistent with other kernel interface namings, rename
      of_get_named_gen_pool() to of_gen_pool_get().  In the original function
      name "_named" suffix references to a device tree property, which contains
      a phandle to a device and the corresponding device driver is assumed to
      register a gen_pool object.
      
      Due to a weak relation and to avoid any confusion (e.g.  in future
      possible scenario if gen_pool objects are named) the suffix is removed.
      
      [sfr@canb.auug.org.au: crypto/marvell/cesa - fix up for of_get_named_gen_pool() rename]
      Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Boris BREZILLON <boris.brezillon@free-electrons.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      abdd4a70
  4. 19 6月, 2015 10 次提交