From patchwork Wed Dec 29 09:58:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kasatkin X-Patchwork-Id: 438001 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBT9wjDC030450 for ; Wed, 29 Dec 2010 09:58:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751255Ab0L2J6m (ORCPT ); Wed, 29 Dec 2010 04:58:42 -0500 Received: from smtp.nokia.com ([147.243.1.48]:64169 "EHLO mgw-sa02.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751001Ab0L2J6l (ORCPT ); Wed, 29 Dec 2010 04:58:41 -0500 Received: from localhost.localdomain (esdhcp041179.research.nokia.com [172.21.41.179]) by mgw-sa02.nokia.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id oBT9wY0I008188; Wed, 29 Dec 2010 11:58:34 +0200 From: Dmitry Kasatkin To: herbert@gondor.hengli.com.au Cc: linux-crypto@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH 1/1] omap-sham: backlog handling fix Date: Wed, 29 Dec 2010 11:58:28 +0200 Message-Id: <16ffeda30b634b3ee0c9b55220b30dd689c5d182.1293616613.git.dmitry.kasatkin@nokia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: In-Reply-To: References: X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 29 Dec 2010 09:58:45 +0000 (UTC) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index eb988e7..2e71123 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -664,7 +664,7 @@ static void omap_sham_finish_req(struct ahash_request *req, int err) static int omap_sham_handle_queue(struct omap_sham_dev *dd, struct ahash_request *req) { - struct crypto_async_request *async_req, *backlog = 0; + struct crypto_async_request *async_req, *backlog; struct omap_sham_reqctx *ctx; struct ahash_request *prev_req; unsigned long flags; @@ -677,11 +677,10 @@ static int omap_sham_handle_queue(struct omap_sham_dev *dd, spin_unlock_irqrestore(&dd->lock, flags); return ret; } + backlog = crypto_get_backlog(&dd->queue); async_req = crypto_dequeue_request(&dd->queue); - if (async_req) { + if (async_req) dd->flags |= FLAGS_BUSY; - backlog = crypto_get_backlog(&dd->queue); - } spin_unlock_irqrestore(&dd->lock, flags); if (!async_req)