Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932874AbbDGXX7 (ORCPT ); Tue, 7 Apr 2015 19:23:59 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:55657 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754387AbbDGWwc (ORCPT ); Tue, 7 Apr 2015 18:52:32 -0400 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: =?UTF-8?q?Ignacy=20Gaw=C4=99dzki?= , "David S. Miller" , Kamal Mostafa Subject: [PATCH 3.13.y-ckt 058/156] ematch: Fix auto-loading of ematch modules. Date: Tue, 7 Apr 2015 15:49:55 -0700 Message-Id: <1428447093-3282-59-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1428447093-3282-1-git-send-email-kamal@canonical.com> References: <1428447093-3282-1-git-send-email-kamal@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Extended-Stable: 3.13 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1285 Lines: 40 3.13.11-ckt19 -stable review patch. If anyone has any objections, please let me know. ------------------ From: =?UTF-8?q?Ignacy=20Gaw=C4=99dzki?= [ Upstream commit 34eea79e2664b314cab6a30fc582fdfa7a1bb1df ] In tcf_em_validate(), after calling request_module() to load the kind-specific module, set em->ops to NULL before returning -EAGAIN, so that module_put() is not called again by tcf_em_tree_destroy(). Signed-off-by: Ignacy Gawędzki Acked-by: Cong Wang Signed-off-by: David S. Miller Signed-off-by: Kamal Mostafa --- net/sched/ematch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 3a633de..a2abc44 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -227,6 +227,7 @@ static int tcf_em_validate(struct tcf_proto *tp, * to replay the request. */ module_put(em->ops->owner); + em->ops = NULL; err = -EAGAIN; } #endif -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/