Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932171AbbELHdZ (ORCPT ); Tue, 12 May 2015 03:33:25 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:54251 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752668AbbELHdW (ORCPT ); Tue, 12 May 2015 03:33:22 -0400 From: Arnd Bergmann To: Baolin Wang Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, y2038 Mailman List Subject: Re: [PATCH v3 05/22] posix-timers:Convert to the 64bit methods for the timer_gettime syscall function Date: Tue, 12 May 2015 09:33:18 +0200 Message-ID: <49986285.ET1L7YzbRx@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1431342914-29569-1-git-send-email-baolin.wang@linaro.org> <3090730.Lc4aTu6C4b@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:8agxDwgmrKf2bNIxbYn6itYPxt3lGkPHZtu8PD0ficYHCjsdxs3 s/VrG4d+Nt6jRjMHfqMPaaDDItC7j/I4sWQJ2OPatHxSNQIqjd7pRZ0Ai1Th84alIz39est EoqsUW4w5YcJNhbd7bzo3uwgKRVp/CSXqZf/5BXQZqe1w1CITUFQyRGHV6sabpSXn9uKPLm oDRhA/bDDKWvM0AkOOD5Q== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1535 Lines: 39 On Tuesday 12 May 2015 10:05:45 Baolin Wang wrote: > On 12 May 2015 at 00:30, Arnd Bergmann wrote: > > > On Monday 11 May 2015 19:15:14 Baolin Wang wrote: > > > +static int default_timer_get64(struct k_itimer *timr, > > > + struct itimerspec64 *cur_setting64) > > > +{ > > > + struct itimerspec cur_setting; > > > + struct k_clock *kc = clockid_to_kclock(timr->it_clock); > > > + > > > + kc->timer_get(timr, &cur_setting); > > > + return 0; > > > +} > > > > This function is unfortunately incorrect, because you never copy > > the cur_setting value into cur_setting64. > > > > Thanks for your comments. But i think this is just a temporary default > function, > and will be removed after all the drivers' conversion, so just ensure it > won't > cause the kernel crash. > No, that function has to do the right thing. The purpose of the function is to keep the kernel working when only half the series is applied, this is a fundamental part of how we do kernel development: Each patch in you series needs to bring the kernel closer to what we want to have in the end but not introduce bugs. Your current function stops the timer_gettime() system call from working and makes it return uninitialized kernel data. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/