lkml.org 
[lkml]   [2008]   [Mar]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 01 Mar 2008 21:15:19 -0800
From"Andrew G. Morgan" <>
SubjectRe: [PATCH] cleanup: correct tabbing of check_kill_permission()
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Christoph,

I ran it through scripts/checkpatch.pl - it said it was ok - and I see
that other places in this file contain code of this style -
do_sigaltstack() for example.

Could you give me a reference for "completely right"? Its not obvious to
me that Documentation/CodingStyle is what you are using as a reference.

Thanks

Andrew

Christoph Hellwig wrote:
| On Sat, Mar 01, 2008 at 02:32:38PM -0800, Andrew G. Morgan wrote:
|> +	if (info == SEND_SIG_NOINFO
|> +	    || (!is_si_special(info) && SI_FROMUSER(info))) {
|> +		 /* Let audit system see the signal */
|> +		error = audit_signal_info(sig, t);
|>  		if (error)
|>  			return error;
|>  		error = -EPERM;
|> -		if (((sig != SIGCONT) ||
|> -			(task_session_nr(current) != task_session_nr(t)))
|> +		if (((sig != SIGCONT)
|> +		     || (task_session_nr(current) != task_session_nr(t)))
|>  		    && (current->euid ^ t->suid) && (current->euid ^ t->uid)
|>  		    && (current->uid ^ t->suid) && (current->uid ^ t->uid)
|>  		    && !capable(CAP_KILL))
|> -		return error;
|> +			return error;
|
| If you start reformmating it please get it completely right:
|
| 	if (info == SEND_SIG_NOINFO ||
| 	    (!is_si_special(info) && SI_FROMUSER(info))) {
| 		/* Let audit system see the signal */
| 		error = audit_signal_info(sig, t);
|  		if (error)
|  			return error;
|  		error = -EPERM;
| 		if ((sig != SIGCONT ||
| 		     (task_session_nr(current) != task_session_nr(t))) &&
| 		    (current->euid ^ t->suid) && (current->euid ^ t->uid) &&
| 		    (current->uid ^ t->suid) && (current->uid ^ t->uid) &&
| 		    !capable(CAP_KILL))
| 			return error;
|  	}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFHyjfn+bHCR3gb8jsRAuilAJ9QJKsEQz66UrFtLOCcHVokGcVV7wCeP0HE
ftOI2APLX1YpWiznyhLfN6U=
=HGa0
-----END PGP SIGNATURE-----

\
 
 \ /
  Last update: 2008-03-02 06:19    [from the cache]
©2003-2008