Re: 2.6.27-rc6-mmotm0913 build error - suspect itimers-fix-itimer-many-thread-hang.patch

Previous thread: 2.6.27-rc6-mmotm0913 build error - fs-sysfs-dirc-remove-unused-__sysfs_get_dentry.patch by Valdis.Kletnieks on Monday, September 15, 2008 - 9:16 am. (2 messages)

Next thread: [PATCH] kernel-doc: allow structs whose members are all private by Randy Dunlap on Monday, September 15, 2008 - 10:02 am. (3 messages)
From: Valdis.Kletnieks
Date: Monday, September 15, 2008 - 9:29 am

Trying to build rc6-mmotm0913 dies:

  CC      security/selinux/hooks.o
security/selinux/hooks.c: In function =E2=80=98selinux_bprm_committing_cr=
eds=E2=80=99:
security/selinux/hooks.c:2325: error: =E2=80=98struct task_struct=E2=80=
=99 has no member named =E2=80=98it_prof_expires=E2=80=99
make=5B2=5D: *** =5Bsecurity/selinux/hooks.o=5D Error 1
make=5B1=5D: *** =5Bsecurity/selinux=5D Error 2
make: *** =5Bsecurity=5D Error 2

I suspect that itimers-fix-itimer-many-thread-hang.patch has a merge issu=
e
against linux-next.patch, causing selinux_bprm_commiting_creds to be miss=
ing
an update.  The code as it appears in my tree (end of that function
in security/selinux/hooks.c):

       if (rc) =7B
                for (i =3D 0; i < RLIM_NLIMITS; i++) =7B
                        rlim =3D current->signal->rlim + i;
                        initrlim =3D init_task.signal->rlim+i;
                        rlim->rlim_cur =3D min(rlim->rlim_max, initrlim->=
rlim_cur);
                =7D

                if (current->signal->rlim=5BRLIMIT_CPU=5D.rlim_cur =21=3D=
 RLIM_INFINITY) =7B
                        /*
                         * This will cause RLIMIT_CPU calculations to be
                         * refigured.
                         */
                        current->it_prof_expires =3D jiffies_to_cputime(1=
);
                =7D
        =7D
=7D

Looks like that current->it_prof_expires should be something else, but th=
e
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_MUTEX=
ES
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=
.. ;)



From: Frank Mayhar
Date: Monday, September 15, 2008 - 10:13 am

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.

--

From: Valdis.Kletnieks
Date: Monday, September 15, 2008 - 10:58 am

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

Thanks for the help. :)
Previous thread: 2.6.27-rc6-mmotm0913 build error - fs-sysfs-dirc-remove-unused-__sysfs_get_dentry.patch by Valdis.Kletnieks on Monday, September 15, 2008 - 9:16 am. (2 messages)

Next thread: [PATCH] kernel-doc: allow structs whose members are all private by Randy Dunlap on Monday, September 15, 2008 - 10:02 am. (3 messages)