mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 2.6.27-rc6-mmotm0913 build error - suspect itimers-fix-itimer-many-thread-hang.patch
@ 2008-09-15 16:29 Valdis.Kletnieks
  2008-09-15 17:13 ` Frank Mayhar
  0 siblings, 1 reply; 3+ messages in thread
From: Valdis.Kletnieks @ 2008-09-15 16:29 UTC (permalink / raw)
  To: Andrew Morton, Frank Mayhar; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]

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);
                }
        }
}

Looks like that current->it_prof_expires should be something else, but the
linux-next.patch update for hooks.c is such a train wreck that I can't
figure out what's going on or what *should* be going on?

(After the 2 build errors I reported, plus hitting the CONFIG_DEBUG_MUTEXES
glitch that Kosaki Motohiro reported, I gave up - if the fix for this one
is obvious, I'll see what *else* I can break before the next -mmotm drops.. ;)




[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6.27-rc6-mmotm0913 build error - suspect itimers-fix-itimer-many-thread-hang.patch
  2008-09-15 16:29 2.6.27-rc6-mmotm0913 build error - suspect itimers-fix-itimer-many-thread-hang.patch Valdis.Kletnieks
@ 2008-09-15 17:13 ` Frank Mayhar
  2008-09-15 17:58   ` Valdis.Kletnieks
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Mayhar @ 2008-09-15 17:13 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: Andrew Morton, linux-kernel

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6.27-rc6-mmotm0913 build error - suspect itimers-fix-itimer-many-thread-hang.patch
  2008-09-15 17:13 ` Frank Mayhar
@ 2008-09-15 17:58   ` Valdis.Kletnieks
  0 siblings, 0 replies; 3+ messages in thread
From: Valdis.Kletnieks @ 2008-09-15 17:58 UTC (permalink / raw)
  To: Frank Mayhar; +Cc: Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]

On Mon, 15 Sep 2008 10:13:24 PDT, Frank Mayhar said:

> 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.

Yeah, it had the #include already, and with the above fix, I actually got a
clean build of the kernel.  Boot testing will have to wait till tonight...

Thanks for the help. :)

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-15 17:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-15 16:29 2.6.27-rc6-mmotm0913 build error - suspect itimers-fix-itimer-many-thread-hang.patch Valdis.Kletnieks
2008-09-15 17:13 ` Frank Mayhar
2008-09-15 17:58   ` Valdis.Kletnieks

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®