From owner-freebsd-current@freebsd.org Sun Jan 31 06:30:54 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E392A731C6 for ; Sun, 31 Jan 2016 06:30:54 +0000 (UTC) (envelope-from mokhi64@gmail.com) Received: from mail-lf0-x231.google.com (mail-lf0-x231.google.com [IPv6:2a00:1450:4010:c07::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E564ED62; Sun, 31 Jan 2016 06:30:53 +0000 (UTC) (envelope-from mokhi64@gmail.com) Received: by mail-lf0-x231.google.com with SMTP id j78so9010673lfb.1; Sat, 30 Jan 2016 22:30:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LZPA8enyn6EotIA/reOTNGP/qgaSHI25oAkt4FPKpoM=; b=WSYiBHJHn1ZOeFOtMEXyRjOscQz3qyKbNboP3TBhm4rQDRYteKYHWotGgLKaCb1Vql PnRW1iz5s1A8Z0xyneTfPkLstCY/wNn4O7MZeS4MSCOGM+aFTB9hcmyYrTKlVV8MfLdA vjlfmNyDeUDIsflne2bv52Zu8/m4k1K+JOtxGnVi4UGSuj+9qfo2Q7sgIJgdSXKokdun 952MfJiZAyTHm1QRsXRlym844XaCRoEXzrTTpmWJVEMkYPn2JlzG8tPZtQfT1IQlWAfb AK0vNg5V/hLXk0cXaEbWIrtYatvA6eIW735MLGwV1O0mWW8zen62If0Z3FOTVNUSupx0 rlDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=LZPA8enyn6EotIA/reOTNGP/qgaSHI25oAkt4FPKpoM=; b=hI00i0WaEDslbs5F4nIFEkE6rNjz8pDjDDASYX2FO7g37NhuPPuldbJJ53XOCH9T+4 FdQzzvrILZjPAqcghF1EUhWSFMK9ZgK+DxNbwi2cS7MdIefA/HV5aWxpVBiQZ2oKWdO7 5QEc0w7U+ontxIMG1+y3QlF3ENqt0D167toM9jZ1+n1d1djrRAGTMfO0pV9nrVElzfvy 3bTNDUCgzvjl3JaYZe4KhPYlZiy2nRfS1qEp26x7tCAQ2NNywogwvIS4rw8xXNYCBW6r J/hEJZRGZfCqsMmVh625Tx9rNObNdP8VWX+bqJe+zXbhMCk1BP0EStFP0tpwl7QghETm IW9Q== X-Gm-Message-State: AG10YOQ05kpyrT8OEwqjPsr+xFkOC9o9EmoBhl6J3TWfNqpAz23KCRJZef2Pbb0vXBnbtkK+kNkbLc38/Wu5kw== MIME-Version: 1.0 X-Received: by 10.25.137.136 with SMTP id l130mr5291380lfd.158.1454221851993; Sat, 30 Jan 2016 22:30:51 -0800 (PST) Received: by 10.25.139.68 with HTTP; Sat, 30 Jan 2016 22:30:51 -0800 (PST) In-Reply-To: <37EC2460-9C4D-46D4-91A1-FA6CE7B0BFB1@bsdimp.com> References: <1454188175.32550.3.camel@freebsd.org> <37EC2460-9C4D-46D4-91A1-FA6CE7B0BFB1@bsdimp.com> Date: Sun, 31 Jan 2016 10:00:51 +0330 Message-ID: Subject: Re: thread-unsafety problems as spl*() ones are NOP From: mokhi To: Warner Losh Cc: Ian Lepore , FreeBSD Current Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 06:30:54 -0000 @imp: i exactly mean (Okay not so exact but very near ;D) what you said. after analyzing kbd.c functions (eg, kbd_realloc_array()) i concluded there are race conditions (and at result in some places there are un-protected data too) i don't mean to blindly replace splXXX() with locks, but the places i see race-conds. Also i should say there are manythings i dunno well or i dont have deep understanding of them and that's why im here to ask (ie what special condition Giant-Lock makes here [i should care about] and what is MPSAFE basically) i'd happy if you answer me those question too :D Regards, Mokhi.