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] [day] [month] [year] [list]
Message-ID: <1399571750.8479.2.camel@joe-AO725>
Date:	Thu, 08 May 2014 10:55:50 -0700
From:	Joe Perches <joe@...ches.com>
To:	Fabian Frederick <fabf@...net.be>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	akpm <akpm@...ux-foundation.org>
Subject: Re: [PATCH V2] kernel/kprobes.c: code clean-up

On Thu, 2014-05-08 at 19:45 +0200, Fabian Frederick wrote:
> -Simplify __get_valid_kprobe (by Joe Perches)

Hello Fabian.

This bit should probably be a separate patch.

> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
[]
> @@ -1382,15 +1384,16 @@ static struct kprobe * __kprobes __get_valid_kprobe(struct kprobe *p)
>  	if (unlikely(!ap))
>  		return NULL;
>  
> -	if (p != ap) {
> -		list_for_each_entry_rcu(list_p, &ap->list, list)
> -			if (list_p == p)
> -			/* kprobe p is a valid probe */
> -				goto valid;
> -		return NULL;
> +	if (p == ap)
> +		return ap;
> +
> +	/* Make sure p is a valid probe*/
> +	list_for_each_entry_rcu(list_p, &ap->list, list){

Missing space between "){"

> +		if (list_p == p)
> +			return ap;
>  	}
> -valid:
> -	return ap;
> +
> +	return NULL;
>  }
>  
>  /* Return error if the kprobe is being re-registered */

Please remember to use scripts/checkpatch.pl on your patches
before sending them.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ