From patchwork Thu Oct 27 12:25:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 687581 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3t4R1n11pvz9t1C; Thu, 27 Oct 2016 23:25:49 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical-com.20150623.gappssmtp.com header.i=@canonical-com.20150623.gappssmtp.com header.b=QEcRua9x; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1bzjkf-0006MA-VU; Thu, 27 Oct 2016 12:25:45 +0000 Received: from mail-qk0-f174.google.com ([209.85.220.174]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1bzjkW-0006Ks-RW for kernel-team@lists.ubuntu.com; Thu, 27 Oct 2016 12:25:36 +0000 Received: by mail-qk0-f174.google.com with SMTP id n189so41172635qke.0 for ; Thu, 27 Oct 2016 05:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=6LNovoHIb44AKZ0AtN+9DkbLf7Aj4wUs7+7o6QjLbDw=; b=QEcRua9xOUTtHLWC1puiCO48XdneCX/tmlUCOMwvB9vy3xrB2DlOik1Fkv56rYAZdw WXFWNId2V85svNNPDTB/fIVAliFmpVnzFP+QZ2m7LVO/OLAQt6sa73m6bx+ZzPJAUrnH xI8hQPCVojOMHBSNwsyljwflnGETMexTd2PN4X80yONXh9/rgWcFTaIQgGKO4BxGezC3 7HArikVHFUgjkWT8e/I0Bxr/M0iippuHoAcc1hooeQKSoO17KfTUsehn4Xi8OJn8+Jpq t2z71HSQGxOgwxsHabE6Em9JDSonYuFlnxSBG4bd4Eh/I91y0myI4g3eW2Bj7yvJ+Tor //IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=6LNovoHIb44AKZ0AtN+9DkbLf7Aj4wUs7+7o6QjLbDw=; b=gMaCqqWtggB8oLhnG4iZsbiCHQppNZFPaSoNTBQhRui+6ffrMy1ndZrG9ReZnuJlxo vCYUXTBuDiM8oqbAAMy3oIDTi+YguglDPcwvzYA+WD7iZf1dbyiVVD/emtGZEZvNyTj3 CDAclccRk8H2H1Hy+iW2zevp981Iwp1BNWhPvSL7Y2n6gSXPtmdoGEjWMDrqeXR8gT8Y XGg+Y60iyS3LqKEL1vzXgenYG+k3Nr1ITSpsHbEQRr0XxfUQdw0gErF43jBzT9EXwGZf YrOFGUondECXEgRiwltLjwPwbs66H2Quj+b2alYLTz4yWIplZCm5nm5dMLTpUpPT3OPv 71ZQ== X-Gm-Message-State: ABUngvf2azXnmBDqjE+u2NMBMii752H4wdDhuXoiz+PZnLoRC0+0AKim1dLaDgHAdWPJJ0xc X-Received: by 10.55.189.4 with SMTP id n4mr5894379qkf.209.1477571135502; Thu, 27 Oct 2016 05:25:35 -0700 (PDT) Received: from localhost.localdomain ([189.79.179.176]) by smtp.gmail.com with ESMTPSA id u44sm3489436qtu.5.2016.10.27.05.25.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Oct 2016 05:25:34 -0700 (PDT) From: Marcelo Cerri To: kernel-team@lists.ubuntu.com Subject: [Xenial][PATCH 2/2] crypto: mcryptd - Fix load failure Date: Thu, 27 Oct 2016 10:25:26 -0200 Message-Id: <1477571126-15915-2-git-send-email-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477571126-15915-1-git-send-email-marcelo.cerri@canonical.com> References: <1477571126-15915-1-git-send-email-marcelo.cerri@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Wang, Rui Y BugLink: https://bugs.launchpad.net/bugs/1637165 mcryptd_create_hash() fails by returning -EINVAL, causing any driver using mcryptd to fail to load. It is because it needs to set its statesize properly. Signed-off-by: Rui Wang Signed-off-by: Herbert Xu (cherry picked from commit ddef482420b1ba8ec45e6123a7e8d3f67b21e5e3) Signed-off-by: Marcelo Cerri --- crypto/mcryptd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/mcryptd.c b/crypto/mcryptd.c index fe5b495a..cfb68a8 100644 --- a/crypto/mcryptd.c +++ b/crypto/mcryptd.c @@ -526,6 +526,7 @@ static int mcryptd_create_hash(struct crypto_template *tmpl, struct rtattr **tb, inst->alg.halg.base.cra_flags = type; inst->alg.halg.digestsize = salg->digestsize; + inst->alg.halg.statesize = salg->statesize; inst->alg.halg.base.cra_ctxsize = sizeof(struct mcryptd_hash_ctx); inst->alg.halg.base.cra_init = mcryptd_hash_init_tfm;