lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47FF5FBF.6030802@trash.net>
Date:	Fri, 11 Apr 2008 14:55:27 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	Jarek Poplawski <jarkao2@...il.com>
CC:	David Miller <davem@...emloft.net>,
	Jamal Hadi Salim <hadi@...erus.ca>, netdev@...r.kernel.org
Subject: Re: [PATCH][NET_SCHED] cls_u32: refcounting fix for u32_delete()

Jarek Poplawski wrote:
> [NET_SCHED] cls_u32: refcounting fix for u32_delete()
> 
> @@ -441,8 +443,10 @@ static int u32_delete(struct tcf_proto *tp, unsigned long arg)
>  	if (tp->root == ht)
>  		return -EINVAL;
>  
> -	if (--ht->refcnt == 0)
> +	if (ht->refcnt == 1) {
> +		ht->refcnt--;
>  		u32_destroy_hnode(tp, ht);
> +	}
>  

Shouldn't the refcount be decremented unconditionally?
Otherwise I'd suggest to reject the removal if refcnt > 1,
but silently doing nothing doesn't seem right.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ