From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752943AbdKXG0s (ORCPT ); Fri, 24 Nov 2017 01:26:48 -0500 Received: from mail-io0-f178.google.com ([209.85.223.178]:40376 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752456AbdKXG0q (ORCPT ); Fri, 24 Nov 2017 01:26:46 -0500 X-Google-Smtp-Source: AGs4zMZx7juYT3sy1jeKId9N+TcngbYjpR5QlZ7/bnumC2PlGRva5fLAILjPzMzVsjkicumyUx5dFQ== Subject: Re: [PATCH RT 03/10] random: avoid preempt_disable()ed section To: Steven Rostedt , linux-kernel@vger.kernel.org, linux-rt-users Cc: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Paul Gortmaker , Julia Cartwright , Daniel Wagner , tom.zanussi@linux.intel.com References: <20171123053341.174002403@goodmis.org> <20171123053433.594374450@goodmis.org> From: Alex Shi Message-ID: <584fdcad-9afe-fb19-04dd-46358a04fc17@linaro.org> Date: Fri, 24 Nov 2017 14:26:40 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171123053433.594374450@goodmis.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steve, I just build the patches, a build error found here: drivers/char/random.c: In function ‘get_random_int’: drivers/char/random.c:1816:7: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash); ^ drivers/char/random.c: In function ‘get_random_long’: drivers/char/random.c:1838:7: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash); ^ > - hash = get_cpu_var(get_random_int_hash); > + hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash); ^ Is this a extra '&' which need to remove? > > hash[0] += current->pid + jiffies + random_get_entropy(); > md5_transform(hash, random_int_secret); > ret = hash[0]; > - put_cpu_var(get_random_int_hash); > + put_locked_var(hash_entropy_int_lock, get_random_int_hash); > > return ret; > } > @@ -1833,12 +1835,12 @@ unsigned long get_random_long(void) > if (arch_get_random_long(&ret)) > return ret; > > - hash = get_cpu_var(get_random_int_hash); > + hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash); ^ Ditto Regards Alex