From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Nielsen Subject: Re: [PATCH v3] Add refcounts to LED target Date: Fri, 09 Apr 2010 08:45:31 +1000 Message-ID: <4BBE5C8B.3070307@shikadi.net> References: <4BAB6E70.8090605@trash.net> <4BAD841A.9060103@shikadi.net> <4BADEE6A.5000103@shikadi.net> <4BAEB013.6060001@shikadi.net> <4BBCAF97.6040806@trash.net> <4BBD478F.4050208@shikadi.net> <20100408210722.GA18974@Chamillionaire.breakpoint.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Patrick McHardy , Jan Engelhardt , Netfilter Developer Mailing List To: Florian Westphal Return-path: Received: from vitalin.sorra.shikadi.net ([64.71.152.201]:52957 "EHLO vitalin.sorra.shikadi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933331Ab0DHWpi (ORCPT ); Thu, 8 Apr 2010 18:45:38 -0400 In-Reply-To: <20100408210722.GA18974@Chamillionaire.breakpoint.cc> Sender: netfilter-devel-owner@vger.kernel.org List-ID: >> +static struct xt_led_info_internal *led_trigger_lookup(const char *name) >> +{ >> + struct xt_led_info_internal *ledinternal; >> + >> + list_for_each_entry(ledinternal, &xt_led_triggers, list) { >> + if (!strcmp(name, ledinternal->netfilter_led_trigger.name)) { >> + mutex_unlock(&xt_led_mutex); > > This mutex_unlock looks out of place... Oh well spotted, I forgot to take that out when moving the mutex out of this function. >> + ledinternal->trigger_id = kzalloc(strlen(ledinfo->id) + 1, GFP_KERNEL); > > kstrdup()? Thanks for the suggestion, I will change this to use kstrdup(). Cheers, Adam.