Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262246AbTERWpP (ORCPT ); Sun, 18 May 2003 18:45:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262247AbTERWpP (ORCPT ); Sun, 18 May 2003 18:45:15 -0400 Received: from hera.cwi.nl ([192.16.191.8]:44979 "EHLO hera.cwi.nl") by vger.kernel.org with ESMTP id S262246AbTERWpO (ORCPT ); Sun, 18 May 2003 18:45:14 -0400 From: Andries.Brouwer@cwi.nl Date: Mon, 19 May 2003 00:57:37 +0200 (MEST) Message-Id: To: torvalds@transmeta.com, viro@math.psu.edu Subject: [PATCH] fix oops in namespace.c Cc: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 865 Lines: 27 Number four in the series of namespace.c fixes: A familar type of Oops: d_path() can return an error ENAMETOOLONG, and if we fail to test a segfault occurs. So we must test. What we do is a different matter. Rather arbitrarily I return the string " (too long)" for use in /proc/mounts. Andries --- namespace.c~ Mon May 19 01:50:48 2003 +++ namespace.c Mon May 19 01:51:24 2003 @@ -217,6 +217,8 @@ if (!path_buf) return -ENOMEM; path = d_path(mnt->mnt_root, mnt, path_buf, PAGE_SIZE); + if (IS_ERR(path)) + path = " (too long)"; mangle(m, mnt->mnt_devname ? mnt->mnt_devname : "none"); seq_putc(m, ' '); - 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/