Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp600487imm; Fri, 1 Jun 2018 06:33:28 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKDmy60oLqFQTte9nJWJL9Ttd3lS3L20u2X4Rk5GvJ45eEEumWRnHacKLMZb8uo5ud2rpi7 X-Received: by 2002:a17:902:b216:: with SMTP id t22-v6mr11141119plr.199.1527860008281; Fri, 01 Jun 2018 06:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527860008; cv=none; d=google.com; s=arc-20160816; b=BdmED6wz5OwpkD5LNbApJSkWamH0Xfsiej1b+JbpCLRxp2eLe93W57drpBHGHE2r+F slohTdNSjbTgqHlLDtBE4wNnMhM/ZSf+2HF3NwK16V8Aq9gBpxPS9lScVWGP1Lmq8zH+ 9cKzjc0JUTWYDjsvMHMh6z89MrH9NjNOfwu8Hfq0QjOcpOZlrnlVCYt86kEvyI+AQOVR BfZ5RDCzpK4+aA8D7gZ8gmodcu3ghdiRWS1mLyiKm/piOb5xkY11Hf32HLYNWPnS8z4U HTcRS+Y21d0A5daTpdoJ3GHA7SgV6Iizv6LlKZ+Dtft6TcLPR0VfK2PjibfQIE0es9iA 1QjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :mime-version:references:in-reply-to:subject:cc:to:from :arc-authentication-results; bh=aMxYjhehX2+H8RkscthTQnEagbecUCT/uqSdue7BqDs=; b=Ub3EYCpLZTa6/JHaIYObTZmTYwY3bZHqlq7HIbvO629rIrmon9ANpka2iO5qofb00J jpp8qKTdPmkyZlMgQIVm7Gn2ibopKi3eU8YQZqx8VjCnA1gYDAPVup14AOqvtVV76QQk av3E2YVbGjCcsXbddNzHYf31Tja8wrZWlB1tMT22Y07W3G2ASNhZLXzvptejNzKLmdaB sbuuBLmeuaVo3uegGnw3aRdQ/rB+dNW70UlnC/0PdjBtaynof0XYDFvAl16jb69SvXi2 kieyj3mFHIdzqsCL4rteFc9wc11uNXECOLlxhK7dNv2DxKZcQT9vBfnmumLkpD18HtuV XhAg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o33-v6si41631090pld.170.2018.06.01.06.33.13; Fri, 01 Jun 2018 06:33:28 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751988AbeFANcc (ORCPT + 99 others); Fri, 1 Jun 2018 09:32:32 -0400 Received: from outbound.smtp.vt.edu ([198.82.183.121]:51546 "EHLO omr1.cc.vt.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751068AbeFANcb (ORCPT ); Fri, 1 Jun 2018 09:32:31 -0400 Received: from mr1.cc.vt.edu (junk.cc.ipv6.vt.edu [IPv6:2607:b400:92:9:0:9d:8fcb:4116]) by omr1.cc.vt.edu (8.14.4/8.14.4) with ESMTP id w51DWUFD026639 for ; Fri, 1 Jun 2018 09:32:30 -0400 Received: from mail-qt0-f199.google.com (mail-qt0-f199.google.com [209.85.216.199]) by mr1.cc.vt.edu (8.14.7/8.14.7) with ESMTP id w51DWPPe019158 for ; Fri, 1 Jun 2018 09:32:30 -0400 Received: by mail-qt0-f199.google.com with SMTP id i7-v6so13206974qtp.4 for ; Fri, 01 Jun 2018 06:32:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :mime-version:content-transfer-encoding:date:message-id; bh=aMxYjhehX2+H8RkscthTQnEagbecUCT/uqSdue7BqDs=; b=iZSw1a/nNuvecO7+tHLIzmWZmrDeE1Fby6cfHXkn5hi+mOUr2saa+BawnxCqm/pa3i G8OMsO41cMJ32qLr74G9L06gDckGsmYIJtbyClU1yke95oE8FIX815rX6vCxP5UhlHWa aWOZKRmrkRc5+pV1m3GmU8JYIKknO9qXq4Pu3veLJc0TQbhI5dkLIEKHkGoiORGLmpu7 62OtE079JZiqu6n/pr6LlBpimfoKQ3H4CktK+yf0FvFyuoUud0D8AA2sZbE13n/1ebah EskbYWAiv1lfngxq/6Q4Wgjoel3MPZx2dkS+YLVYBgiL08DsjDGBvYk8hSyh84KqBdDQ M05g== X-Gm-Message-State: APt69E2vmLnO/LY6Nd7iaJUr985EdnNpXchhkEyQ78Ve2e3Pel4QpxxQ pIJvOVTrdp4WQIZM0HIVpAaEfsdSSTWGQWZc3xWRc49SNyHnS4g8BMfiOizwKfNpR7fy3Iw5YHs 5H0tCblK5xHKfAJElMGz47gPW+vhx7c4lVFY= X-Received: by 2002:a0c:964e:: with SMTP id 14-v6mr10425658qvy.98.1527859945256; Fri, 01 Jun 2018 06:32:25 -0700 (PDT) X-Received: by 2002:a0c:964e:: with SMTP id 14-v6mr10425646qvy.98.1527859945046; Fri, 01 Jun 2018 06:32:25 -0700 (PDT) Received: from turing-police.cc.vt.edu ([2601:5c0:c001:4341:1a4:fa48:251d:6dab]) by smtp.gmail.com with ESMTPSA id b71-v6sm17165162qkj.89.2018.06.01.06.32.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jun 2018 06:32:23 -0700 (PDT) From: valdis.kletnieks@vt.edu X-Google-Original-From: Valdis.Kletnieks@vt.edu X-Mailer: exmh version 2.8.0 04/21/2017 with nmh-1.7+dev To: Hugo Lefeuvre Cc: Greg Kroah-Hartman , kernelnewbies@kernelnewbies.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: pi433: add rw semaphore fixing concurrency issues In-Reply-To: <20180601125037.GA2339@hle-laptop.local> References: <20180601125037.GA2339@hle-laptop.local> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1527859942_2795P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Fri, 01 Jun 2018 09:32:22 -0400 Message-ID: <255415.1527859942@turing-police.cc.vt.edu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --==_Exmh_1527859942_2795P Content-Type: text/plain; charset=us-ascii On Fri, 01 Jun 2018 08:50:37 -0400, Hugo Lefeuvre said: > @@ -805,9 +809,11 @@ pi433_read(struct file *filp, char __user *buf, size_t size, loff_t *f_pos) > if (bytes_received > 0) { > retval = copy_to_user(buf, device->rx_buffer, bytes_received); > if (retval) > + up_read(&instance->instance_sem); > return -EFAULT; > } > > + up_read(&instance->instance_sem); > return bytes_received; > } This doesn't do what you think. --==_Exmh_1527859942_2795P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.8.0 04/21/2017 iQEVAwUBWxFK5Y0DS38y7CIcAQJkGgf+I0RaQz7bo2XqowH9nGKoLDp5iinEinuf RhirNWGqRvn8sjQ4jAKB1LKTdQ/XZW8JwMN7ddto5MDFhZS2IbdeY54YXQImgKxd S579JAY7xhcQS60ItudoxzxGUOMNfcuAiQ+H5rdQhFJIqUaELovNq5T6CNK4TTaD p9qgKN6uvX5zapzDmMf9V9Rw8BKr98lVy+dLvYU2LHeAe9d/06DFkIuKCHGDvT9G KBLMMA+yw41d3PDDf8r8galKoPCHCKP60h/7GsRjwtrzEzzTqPXiYaTTpxSNYdt+ QtXJo1xWpD0YzKLFm6kCLqF151bc00qmJpqT2AetYrfnTZHjQE/oTg== =PovE -----END PGP SIGNATURE----- --==_Exmh_1527859942_2795P--