mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Mayhar <fmayhar@google.com>
To: Valdis.Kletnieks@vt.edu
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.27-rc6-mmotm0913 build error - suspect itimers-fix-itimer-many-thread-hang.patch
Date: Mon, 15 Sep 2008 10:13:24 -0700	[thread overview]
Message-ID: <1221498804.19012.13.camel@bobble.smo.corp.google.com> (raw)
In-Reply-To: <48922.1221496161@turing-police.cc.vt.edu>

On Mon, 2008-09-15 at 12:29 -0400, Valdis.Kletnieks@vt.edu wrote:
> Trying to build rc6-mmotm0913 dies:
> 
>   CC      security/selinux/hooks.o
> security/selinux/hooks.c: In function ‘selinux_bprm_committing_creds’:
> security/selinux/hooks.c:2325: error: ‘struct task_struct’ has no member named ‘it_prof_expires’
> make[2]: *** [security/selinux/hooks.o] Error 1
> make[1]: *** [security/selinux] Error 2
> make: *** [security] Error 2
> 
> I suspect that itimers-fix-itimer-many-thread-hang.patch has a merge issue
> against linux-next.patch, causing selinux_bprm_commiting_creds to be missing
> an update.  The code as it appears in my tree (end of that function
> in security/selinux/hooks.c):
> 
>        if (rc) {
>                 for (i = 0; i < RLIM_NLIMITS; i++) {
>                         rlim = current->signal->rlim + i;
>                         initrlim = init_task.signal->rlim+i;
>                         rlim->rlim_cur = min(rlim->rlim_max, initrlim->rlim_cur);
>                 }
> 
>                 if (current->signal->rlim[RLIMIT_CPU].rlim_cur != RLIM_INFINITY) {
>                         /*
>                          * This will cause RLIMIT_CPU calculations to be
>                          * refigured.
>                          */
>                         current->it_prof_expires = jiffies_to_cputime(1);
>                 }
>         }
> }

As it happens, my top-of-tree snapshot is missing this routine.  I'm
re-snapping it now but I think you're right that it's a merge issue with
linux-next.  The fix, however, is trivial:  Replace the entire if block
with the line:
	update_rlimit_cpu(rlim->rlim_cur);

The above snippet becomes:

       if (rc) {
                for (i = 0; i < RLIM_NLIMITS; i++) {
                        rlim = current->signal->rlim + i;
                        initrlim = init_task.signal->rlim+i;
                        rlim->rlim_cur = min(rlim->rlim_max, initrlim->rlim_cur);
                }
                update_rlimit_cpu(rlim->rlim_cur);
        }

And double-check that linux/posix-timers.h is being #included around
line 80.
-- 
Frank Mayhar <fmayhar@google.com>
Google, Inc.


  reply	other threads:[~2008-09-15 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-15 16:29 Valdis.Kletnieks
2008-09-15 17:13 ` Frank Mayhar [this message]
2008-09-15 17:58   ` Valdis.Kletnieks

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=1221498804.19012.13.camel@bobble.smo.corp.google.com \
    --to=fmayhar@google.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.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

all inboxes | Powered by JetHome®