Re: ipc-msg broken again on 3.11-rc7?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Vineet Gupta <Vineet.Gupta1@xxxxxxxxxxxx>
> Date: Fri, Aug 30, 2013 at 4:46 AM
> Subject: Re: ipc-msg broken again on 3.11-rc7?
> To: "sedat.dilek@xxxxxxxxx" <sedat.dilek@xxxxxxxxx>
> Cc: linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Davidlohr Bueso <davidlohr.bueso@xxxxxx>, linux-next <linux-next@xxxxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linux-mm <linux-mm@xxxxxxxxx>, Andi Kleen <andi@xxxxxxxxxxxxxx>, Rik van Riel <riel@xxxxxxxxxx>, Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>, Jonathan Gonzalez <jgonzalez@xxxxxxxxx>
>
>
> On 08/30/2013 01:57 PM, Sedat Dilek wrote:
> > On Fri, Aug 30, 2013 at 10:19 AM, Vineet Gupta <vineetg76@xxxxxxxxx> wrote:
> >> Ping ?
> >>
> >> It seems 3.11 is pretty close to releasing but we stil have LTP msgctl08 causing a
> >> hang (atleast on ARC) for both linux-next 20130829 as well as Linus tree.
> >>
> >> So far, I haven't seemed to have drawn attention of people involved.
> >>

I apologize for the delay, I am on vacations and wasnt interrupting my
days at the beach by checking email.

You mention that the msgctl08 test case just hangs, nothing
interesting in dmesg appart from "msgmni has been set to 479" (which
is a standard initialization message anyways)?

After a quick glance, I suspect that the problem might be because we
are calling security_msg_queue_msgsnd() without taking the lock. This
is similar to the issue Sedat reported in the original thread with
find_msg() concerning msgrcv. The rest of the code looks otherwise
standard. Unfortunately I dont have a computer available to write/test
such a fix. I think we can move calls to security_msg_queue_msgsnd()
to be done right before ss_add(), which would simplify the code
changes, something like:

...

/* queue full, wait: */
if (msgflg & IPC_NOWAIT) {
     err = -EAGAIN;
     goto out_unlock1;
}

ipc_lock_object(&msq->q_perm);
err = security_msg_queue_msgsnd(msq, msg, msgflg);
if (err)
    goto out_unlock0;

ss_add(msq, &s);

...


Thanks,
Davidlohr


> >
> > Hi Vineet,
> >
> > I remember fakeroot was an another good test-case for me to test this
> > IPC breakage.
> > Attached is my build-script for Linux-next (tested with Debian/Ubuntu).
> > ( Cannot say if you can play with it in your environment. )
>
> Hi Sedat,
>
> I have a simpler buildroot based rootfs (initramfs based) and LTP is run off of
> NFS, although running of a local storage doesn't make a difference.
>
> For me msgctl08 standalone (w/o hassle of running full LTP) is enough to trigger
> it consistently.
>
> P.S. sorry my sender address kept flipping - mailer was broken !
>
> -Vineet
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux