Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752139AbaBHUGo (ORCPT ); Sat, 8 Feb 2014 15:06:44 -0500 Received: from mail-vc0-f176.google.com ([209.85.220.176]:50062 "EHLO mail-vc0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751071AbaBHUGm (ORCPT ); Sat, 8 Feb 2014 15:06:42 -0500 MIME-Version: 1.0 In-Reply-To: <52F68C67.6050606@gentoo.org> References: <1391886730-19667-1-git-send-email-ryao@gentoo.org> <1391886730-19667-2-git-send-email-ryao@gentoo.org> <52F68C67.6050606@gentoo.org> Date: Sat, 8 Feb 2014 12:06:40 -0800 X-Google-Sender-Auth: UkUwCkXbYjugo_6CrwcMNoXLpXQ Message-ID: Subject: Re: [PATCH 1/2] mm/vmalloc: export is_vmalloc_or_module_addr From: Linus Torvalds To: Richard Yao Cc: Mel Gorman , Andrew Morton , Rik van Riel , Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , "David S. Miller" , V9FS Develooper Mailing List , Linux Netdev Mailing List , Linux Kernel Mailing List , "Aneesh Kumar K.V" , Will Deacon , Christopher Covington , Matthew Thode Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 8, 2014 at 11:58 AM, Richard Yao wrote: > > My apologies for that. Here is the backtrace: > > [] p9_virtio_zc_request+0x45e/0x510 > [] p9_client_zc_rpc.constprop.16+0xfd/0x4f0 > [] p9_client_read+0x15d/0x240 > [] v9fs_fid_readn+0x50/0xa0 > [] v9fs_file_readn+0x10/0x20 > [] v9fs_file_read+0x37/0x70 > [] vfs_read+0x9b/0x160 > [] kernel_read+0x41/0x60 > [] copy_module_from_fd.isra.34+0xfb/0x180 So copy_module_from_fd() does read into a vmalloc'ed buffer (which isn't pretty, but at least it's not like using some statically allocated module data), but that's a regular vmalloc() afaik. So I don't see the need for "is_vmalloc_or_module_addr()". The regular "is_vmalloc_addr()" should be fine, and *is* usable from modules (it's inline, not exported, but it comes to the same thing wrt module use), exactly because we have traditionally allowed vmalloc'ed memory to be used. So is there some reason why it's not just using that simpler function? The kmap_to_page() thing is actually worse, but that's preexisting damage. Linus -- 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/