From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752439AbcAZX2C (ORCPT ); Tue, 26 Jan 2016 18:28:02 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35941 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752243AbcAZX17 (ORCPT ); Tue, 26 Jan 2016 18:27:59 -0500 Date: Tue, 26 Jan 2016 15:27:58 -0800 From: Andrew Morton To: Naoya Horiguchi Cc: Chen Gong , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Naoya Horiguchi Subject: Re: [PATCH v1] mm/madvise: pass return code of memory_failure() to userspace Message-Id: <20160126152758.0638a764ba99ab215c44977c@linux-foundation.org> In-Reply-To: <1453451277-20979-1-git-send-email-n-horiguchi@ah.jp.nec.com> References: <1453451277-20979-1-git-send-email-n-horiguchi@ah.jp.nec.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Jan 2016 17:27:57 +0900 Naoya Horiguchi wrote: > Currently the return value of memory_failure() is not passed to userspace, which > is inconvenient for test programs that want to know the result of error handling. > So let's return it to the caller as we already do in MADV_SOFT_OFFLINE case. I updated this to mention that it's for madvise(MADV_HWPOISON): : Currently the return value of memory_failure() is not passed to userspace : when madvise(MADV_HWPOISON) is used. This is inconvenient for test : programs that want to know the result of error handling. So let's return : it to the caller as we already do in the MADV_SOFT_OFFLINE case. btw, MADV_SOFT_OFFLINE and MADV_HWPOISON are not documented in that comment block over sys_madvise(). Fixy please? You might want to check that no other MADV_foo values have been omitted.