Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755912Ab1FOPtl (ORCPT ); Wed, 15 Jun 2011 11:49:41 -0400 Received: from mail-vx0-f174.google.com ([209.85.220.174]:40125 "EHLO mail-vx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755873Ab1FOPtj (ORCPT ); Wed, 15 Jun 2011 11:49:39 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=NIUOf90RSyYqw2/rAyLRllZ0QBQTdk8Yr0vIFtqSIZJMgz0WO64AFYZ/DveTYxaxrR dnjJaQwI1vEZEelpioUWVpHgJDcXGgnxYKpvxiD1Tkc5p6enwm/wTyBs/uBZE5BCdLq5 5KLUlQe440sYhcdmXJvPWFM0e9QB0WlgxH6mA= MIME-Version: 1.0 In-Reply-To: References: <1307642718-22257-1-git-send-email-minipli@googlemail.com> <20110609155630.0f734351.akpm@linux-foundation.org> <1307711394-7827-1-git-send-email-minipli@googlemail.com> Date: Wed, 15 Jun 2011 17:49:39 +0200 Message-ID: Subject: Re: [PATCH] m68k, exec: remove redundant set_fs(USER_DS) From: Mathias Krause To: Geert Uytterhoeven Cc: Andrew Morton , Linus Torvalds , linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Ungerer Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1099 Lines: 30 On Wed, Jun 15, 2011 at 4:40 PM, Geert Uytterhoeven wrote: > On Fri, Jun 10, 2011 at 15:09, Mathias Krause wrote: >> The address limit is already set in flush_old_exec() so those calls to >> set_fs(USER_DS) are redundant. >> >> Signed-off-by: Mathias Krause >> Cc: Greg Ungerer >> --- >> >> Note: I'm not sure about the assignment to current->thread.fs in >> flush_thread() -- shouldn't this be done in set_fs() itself? > > set_fs() is used to temporary set the address space to be used from the > kernel. > current->thread.fs is the address space that will be used when the > thread returns > to userspace. > So I think it's correct. > > For nommu, thread.fs is set, but not really used. Thanks for the explanation. So only the set_fs() is redundant. Mathias -- 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/