Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp769292imm; Fri, 1 Jun 2018 09:12:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIFsAXBHQmFdWNcUttkiSFW0UvpW6Vc3KieDen9XU9yijEjFuUzWiVAH/pi0s3fxRIEnuYa X-Received: by 2002:a62:968f:: with SMTP id s15-v6mr3501313pfk.191.1527869541762; Fri, 01 Jun 2018 09:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527869541; cv=none; d=google.com; s=arc-20160816; b=Az1Uiiicds+LRTdQq1Bwy/rMZiERlTOJLo+dUOUA4zeMKQoDYD3fZjfA31nHlPN8Sy RYfMhaUENqc8Fks2wQb7CCtACkuECahfNdNs516x5FkTffG7nyBbvHO2tS6YnDpOuyno idyG61BtG4w04Y5srKbuVOsSLAKUrIt5z2ARiYzIqmaiSryru7tR5zT3t3Wi5F8Pes4p +yvNo8FLRFNZgC2bQC30pv34zMPH2I2sA52oxNEkBNzWPEq0zeXZP9ClRQYbldvUP7WY KkMBHjHhes/b7tH8Uw/5ZP//HDUURSbnLFz4wYVk2CvgPNNtq0/U+ledQnKM4Okd3Q1E LSOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=RKuBVj/fjUJh8B3l6W1w3sJbteTCftnHk2nP3V6/lLI=; b=lqz2NopCCKQeys0xnEPYejwNZtcHqIohozxV3Aih8pAj5M18X/d/RNl1yjqmU1lvfX 4o/Sf8zVlhXXyW/W1Cq6zvrCF9/tMevuyORrTV9DT0ixyssGB3/B7K9QUJrMCjxs6TAR 6FtfcHt0x5wCmIloTnkg00fHnFskt9pBL05CGDWGN5peUVtSCEeXgjN/TX/XhpSqq09I /Gb79e54+EgzVrKP+rzTaCIf1lZxCj+cGzHN//8g6Kp+5APcM70cDF1niBblOp/nHzff OQhuJgkimGoiFRu91TWhOb5wOtYiXzVgm/4yymDNwrq7c6GJgwNjVF2rvbAadbvqZWM/ LZ/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jXm+k4Ko; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10-v6si20590278plz.190.2018.06.01.09.12.07; Fri, 01 Jun 2018 09:12:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jXm+k4Ko; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753186AbeFAQKV (ORCPT + 99 others); Fri, 1 Jun 2018 12:10:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:49754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752998AbeFAQKR (ORCPT ); Fri, 1 Jun 2018 12:10:17 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 03B01208B1; Fri, 1 Jun 2018 16:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527869416; bh=0/yrr5BpTZUloEbv7UFrX+x5XWeA169fe3VrTFP2qpU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jXm+k4Ko5s7Rqmv7e2B+jqQjoZf9UDEf6TXU5qxoFcc5ykWZlpni3ppV5gsCKbFtq NPqsZ/6lOTzvR7UmB0c9hptTbkNCnz0Lm8hwC7C8UTKjrWk2sKGRdvX/ekUkXblpWP ePjUSWC64rWPoKRTvc8qP12KqI7eTTHxWHSHhd5U= Date: Fri, 1 Jun 2018 18:09:54 +0200 From: Greg Kroah-Hartman To: Hugo Lefeuvre Cc: kernelnewbies@kernelnewbies.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: pi433: add rw semaphore fixing concurrency issues Message-ID: <20180601160954.GA4895@kroah.com> References: <20180601125037.GA2339@hle-laptop.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180601125037.GA2339@hle-laptop.local> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 01, 2018 at 08:50:37AM -0400, Hugo Lefeuvre wrote: > Add a rw semaphore fixing potential NULL pointer dereferences in the > pi433 driver. Unless you can measure the performance difference, do not use a rw semaphore, just use a normal mutex please. Odds are it will be faster in the end and take up less space. So please test, or if you can't test, just use a mutex. thanks, greg k-h