Received: by 10.192.165.148 with SMTP id m20csp290770imm; Wed, 9 May 2018 12:46:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZot+mgDr5AhWHQTqVquT/pdIfIH+C/hO8GoKBXubWbC8FFGfGvQlYffX+9m3K0ztMFg3fjr X-Received: by 2002:a17:902:ab98:: with SMTP id f24-v6mr19754895plr.144.1525895188179; Wed, 09 May 2018 12:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525895188; cv=none; d=google.com; s=arc-20160816; b=m7MgmFIwyaQ29mJTtATYF61yTdvjq+lA+OXU52qZC2y4eohuoO+cu2BiMOTYiILATX muf0tZxKkJmnqWDemzS4QkywJzIZCF30k+GY6cx+TC8IrnfOziC76m9CeJpY3B+mtdgM nssBWpUFC9vyASe7HCkF1poCvFOpu2ZTFIueQuG8zu7yS0jmPLUKPC6tw2PAQbJPv6jH /WX5+bEYV2oYVHtLFNJWlyGiDH7RoRn/HM3R5sHDVb+8QXvB4WgpZ96t1oct3K9lzqGP iZ4WyuQegJBcUrfUHx0vG0ww3cR74IXIx09P1cFbFT2e1HGXNx9GmePs7xB8bHUUq7F+ GOmQ== 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:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=an1NZ8HgOvXQ3qAiTUX+OZhUKG19UppdKWxdavaCqL4=; b=t2m/sJhn3Ui8SH5Z77blE+p3x9Ns1RQz6xZKaZy31g9tQNT3YkT5/FUy9dARm1jF4l CcQk/9tUbxERzIOMxZOmoZVLzZgg51pA6X8x1ArmgwaxKQj3EZMbOfsif8Ot0gEPhRks 9EG4GiKU1AbqeOZE0t2qa2exLznF8bKJ6X/uoL54+KM1+8boi5SUhE171q3dvfs8XXjZ TkE/pj2RBVg0meid4SL1TaHATTOu4KEiTbawFrbHZjgMVic06BUstnIqPXfksqgcWqAD gLdcxV/3vjd6UxSlG1UaP6iLyzjE6y1r27nL/OtWfbp+9zsXQ+k6GU3dQA1dfRVwLlxN y5zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ad2Wnndz; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p61-v6si26935253plb.472.2018.05.09.12.46.12; Wed, 09 May 2018 12:46: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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ad2Wnndz; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965674AbeEIToR (ORCPT + 99 others); Wed, 9 May 2018 15:44:17 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:40643 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965551AbeEIToQ (ORCPT ); Wed, 9 May 2018 15:44:16 -0400 Received: by mail-lf0-f66.google.com with SMTP id p85-v6so17251074lfg.7 for ; Wed, 09 May 2018 12:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=an1NZ8HgOvXQ3qAiTUX+OZhUKG19UppdKWxdavaCqL4=; b=Ad2Wnndz87NAn6B5TAzfZLJUPXzXvv3/eobHGYI1VPrMK8sQp0kCyFjbS+GfngFate 9riJDrN63pXHW6icaXdsHnrtu9tVulYeiiZVq7wLnkGcZrBWJLcT0tMBT/MbJHYvKv1R 657hLYwsTitaqg0vp80K0SZmvpVrvwUHJ1PTIx6VTML1cEj1n6cspOzlwg541kHhuxOT 3M2c1Gojl1R/HqhGh0bkv4KigzeWijqoWJNarxcLt9t+tP9YGtdkKx9qfeaO6wb1Q6QD TLCntDvINWyRGPhMJPSvf7e2iVEsc/xc+RFQMRUzfTzFehae+5uThXp7ImJpssAgDn5a 01kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=an1NZ8HgOvXQ3qAiTUX+OZhUKG19UppdKWxdavaCqL4=; b=sruo8XlfofmSfdFTTzsqp9He0ZuxpBFsSl2ONWAHTuJCuwgmQhSD9ZFYA+mmZmSf11 +tFh00Acea0D7fp0byi56bzRYrgtVWl9kP4BWU4av7bay+rQ9OEWhF+IhHyE9qaJJ5qN uM9IZlxgztMDCNQbnuOcNGWIaZnncqdicmEY4Jnn3RWsS7rI8swSN6Z7o0aNi1TRl0bM PTBJLUG55z5ysIJV8IdZux2KBvQni4BT9vU3X3zoJ17Vm7gh9x7xYxwvmyBewNIbYYGX xbzEclkJq9KFL0ZrtvFeLSqzJ9AsBQGAOWcdpDNL0tz4wb/fCeivLvEGInYrpnq3NAaE 6pFQ== X-Gm-Message-State: ALKqPwer4dKCA/yXBwYgR9/UxsTP//lO7/CvQmr/luJn+t2tc+Ya0tLY Q2IvS5AICLByCyJbmslK8b4= X-Received: by 2002:a19:1186:: with SMTP id 6-v6mr11537817lfr.134.1525895055242; Wed, 09 May 2018 12:44:15 -0700 (PDT) Received: from alpha (ppp89-110-7-102.pppoe.avangarddsl.ru. [89.110.7.102]) by smtp.gmail.com with ESMTPSA id t19-v6sm4167311ljj.46.2018.05.09.12.44.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 May 2018 12:44:14 -0700 (PDT) Received: (nullmailer pid 22662 invoked by uid 1000); Wed, 09 May 2018 19:45:06 -0000 From: Ivan Safonov To: Greg Kroah-Hartman Cc: Kees Cook , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Larry Finger , Ivan Safonov Subject: [PATCH] staging:r8188eu: Remove rx_handler_data unnecessary read Date: Wed, 9 May 2018 22:44:06 +0300 Message-Id: <20180509194406.22617-1-insafonov@gmail.com> X-Mailer: git-send-email 2.16.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rx handler (assigned with netdev_rx_handler_register, called from __netif_receive_skb()) uses value of dev->rx_handler_data. The driver has no rx handler and does not need it, so remove rx_handler_data read. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/TODO | 5 ----- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 4 ---- 2 files changed, 9 deletions(-) diff --git a/drivers/staging/rtl8188eu/TODO b/drivers/staging/rtl8188eu/TODO index ce60f07b9977..7581e25f231d 100644 --- a/drivers/staging/rtl8188eu/TODO +++ b/drivers/staging/rtl8188eu/TODO @@ -9,11 +9,6 @@ TODO: - merge Realtek's bugfixes and new features into the driver - switch to use LIB80211 - switch to use MAC80211 -- figure out what to do with this code in rtw_recv_indicatepkt(): - rcu_read_lock(); - rcu_dereference(padapter->pnetdev->rx_handler_data); - rcu_read_unlock(); - Perhaps delete it, perhaps assign to some local variable. Please send any patches to Greg Kroah-Hartman , and Larry Finger . diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index bda4ab879f58..7ec53a9dfa27 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -121,10 +121,6 @@ int rtw_recv_indicatepkt(struct adapter *padapter, } } - rcu_read_lock(); - rcu_dereference(padapter->pnetdev->rx_handler_data); - rcu_read_unlock(); - skb->ip_summed = CHECKSUM_NONE; skb->dev = padapter->pnetdev; skb->protocol = eth_type_trans(skb, padapter->pnetdev); -- 2.16.1