From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx155.postini.com [74.125.245.155]) by kanga.kvack.org (Postfix) with SMTP id 3BC306B0044 for ; Sun, 29 Apr 2012 22:30:29 -0400 (EDT) Message-ID: <4F9DF93F.30403@kernel.org> Date: Mon, 30 Apr 2012 11:30:23 +0900 From: Minchan Kim MIME-Version: 1.0 Subject: Re: [PATCH] mm: fix devision by 0 in percpu_pagelist_fraction References: <1335623131-15728-1-git-send-email-levinsasha928@gmail.com> In-Reply-To: <1335623131-15728-1-git-send-email-levinsasha928@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Sasha Levin Cc: akpm@linux-foundation.org, rohit.seth@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org On 04/28/2012 11:25 PM, Sasha Levin wrote: > percpu_pagelist_fraction_sysctl_handler() has only considered -EINVAL as a possible error > from proc_dointvec_minmax(). If any other error is returned, it would proceed to divide by > zero since percpu_pagelist_fraction wasn't getting initialized at any point. For example, > writing 0 bytes into the proc file would trigger the issue. > > Signed-off-by: Sasha Levin Reviewed-by: Minchan Kim -- Kind regards, Minchan Kim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755091Ab2D3Ca3 (ORCPT ); Sun, 29 Apr 2012 22:30:29 -0400 Received: from LGEMRELSE1Q.lge.com ([156.147.1.111]:52411 "EHLO LGEMRELSE1Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754957Ab2D3Ca2 (ORCPT ); Sun, 29 Apr 2012 22:30:28 -0400 X-AuditID: 9c93016f-b7cfcae00000449e-52-4f9df940a804 Message-ID: <4F9DF93F.30403@kernel.org> Date: Mon, 30 Apr 2012 11:30:23 +0900 From: Minchan Kim User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 MIME-Version: 1.0 Newsgroups: gmane.linux.kernel.mm,gmane.linux.kernel To: Sasha Levin CC: akpm@linux-foundation.org, rohit.seth@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: fix devision by 0 in percpu_pagelist_fraction References: <1335623131-15728-1-git-send-email-levinsasha928@gmail.com> In-Reply-To: <1335623131-15728-1-git-send-email-levinsasha928@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/28/2012 11:25 PM, Sasha Levin wrote: > percpu_pagelist_fraction_sysctl_handler() has only considered -EINVAL as a possible error > from proc_dointvec_minmax(). If any other error is returned, it would proceed to divide by > zero since percpu_pagelist_fraction wasn't getting initialized at any point. For example, > writing 0 bytes into the proc file would trigger the issue. > > Signed-off-by: Sasha Levin Reviewed-by: Minchan Kim -- Kind regards, Minchan Kim