From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261394AbVAGMvp (ORCPT ); Fri, 7 Jan 2005 07:51:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261397AbVAGMvp (ORCPT ); Fri, 7 Jan 2005 07:51:45 -0500 Received: from darwin.snarc.org ([81.56.210.228]:42113 "EHLO darwin.snarc.org") by vger.kernel.org with ESMTP id S261394AbVAGMvo (ORCPT ); Fri, 7 Jan 2005 07:51:44 -0500 Date: Fri, 7 Jan 2005 13:51:40 +0100 To: Jesper Juhl Cc: linux-kernel , Andrew Morton Subject: Re: [PATCH][4/4] let's kill verify_area - convert kernel/printk.c to access_ok() Message-ID: <20050107125140.GA2774@snarc.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Warning: Email may contain unsmilyfied humor and/or satire. User-Agent: Mutt/1.5.6+20040907i From: Vincent Hanquez Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 07, 2005 at 02:18:55AM +0100, Jesper Juhl wrote: > @@ -300,8 +300,8 @@ int do_syslog(int type, char __user * bu > error = 0; > if (!len) > goto out; > - error = verify_area(VERIFY_WRITE,buf,len); > - if (error) > + error = access_ok(VERIFY_WRITE,buf,len); > + if (!error) I would rather put the ! on access_ok "if (!error)" is read as "if no error" -- Vincent Hanquez