Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756457Ab3H3Qbo (ORCPT ); Fri, 30 Aug 2013 12:31:44 -0400 Received: from mail-qe0-f49.google.com ([209.85.128.49]:57547 "EHLO mail-qe0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755810Ab3H3Qbm convert rfc822-to-8bit (ORCPT ); Fri, 30 Aug 2013 12:31:42 -0400 MIME-Version: 1.0 In-Reply-To: References: <1372192414.1888.8.camel@buesod1.americas.hpqcorp.net> <1372202983.1888.22.camel@buesod1.americas.hpqcorp.net> <521DE5D7.4040305@synopsys.com> <52205597.3090609@synopsys.com> Date: Fri, 30 Aug 2013 13:31:41 -0300 Message-ID: Subject: Re: ipc-msg broken again on 3.11-rc7? From: Davidlohr Bueso To: Vineet Gupta , sedat.dilek@gmail.com, linus Torvalds , Davidlohr Bueso , linux-next , LKML , Stephen Rothwell , Andrew Morton , linux-mm , Andi Kleen , Rik van Riel , Manfred Spraul , Jonathan Gonzalez Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2932 Lines: 81 > From: Vineet Gupta > Date: Fri, Aug 30, 2013 at 4:46 AM > Subject: Re: ipc-msg broken again on 3.11-rc7? > To: "sedat.dilek@gmail.com" > Cc: linus Torvalds , Davidlohr Bueso , linux-next , LKML , Stephen Rothwell , Andrew Morton , linux-mm , Andi Kleen , Rik van Riel , Manfred Spraul , Jonathan Gonzalez > > > On 08/30/2013 01:57 PM, Sedat Dilek wrote: > > On Fri, Aug 30, 2013 at 10:19 AM, Vineet Gupta 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/