Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753415Ab2JPCfQ (ORCPT ); Mon, 15 Oct 2012 22:35:16 -0400 Received: from mail-oa0-f46.google.com ([209.85.219.46]:40729 "EHLO mail-oa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751094Ab2JPCfP (ORCPT ); Mon, 15 Oct 2012 22:35:15 -0400 MIME-Version: 1.0 In-Reply-To: <20121008150949.GA15130@redhat.com> References: <20121008150949.GA15130@redhat.com> From: KOSAKI Motohiro Date: Mon, 15 Oct 2012 22:34:53 -0400 Message-ID: Subject: Re: mpol_to_str revisited. To: Dave Jones , Linux Kernel , bhutchings@solarflare.com, linux-mm@kvack.org, Linus Torvalds , Andrew Morton 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: 913 Lines: 18 On Mon, Oct 8, 2012 at 11:09 AM, Dave Jones wrote: > Last month I sent in 80de7c3138ee9fd86a98696fd2cf7ad89b995d0a to remove > a user triggerable BUG in mempolicy. > > Ben Hutchings pointed out to me that my change introduced a potential leak > of stack contents to userspace, because none of the callers check the return value. > > This patch adds the missing return checking, and also clears the buffer beforehand. I don't think 80de7c3138ee9fd86a98696fd2cf7ad89b995d0a is right fix. we should close a race (or kill remain ref count leak) if we still have. Because of, this patch makes unstable /proc output and might lead to userland confusing. -- 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/