From: "Andrew G. Morgan" <morgan@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cleanup: correct tabbing of check_kill_permission()
Date: Sat, 01 Mar 2008 21:15:19 -0800 [thread overview]
Message-ID: <47CA37E7.2030404@kernel.org> (raw)
In-Reply-To: <20080302004920.GA31969@infradead.org>
-----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-----
next prev parent reply other threads:[~2008-03-02 5:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-01 22:32 [PATCH] cleanup: correct tabbing of check_kill_permission() Andrew G. Morgan
2008-03-02 0:49 ` Christoph Hellwig
2008-03-02 5:15 ` Andrew G. Morgan [this message]
2008-03-02 8:16 ` Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47CA37E7.2030404@kernel.org \
--to=morgan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox