Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754853AbYHTIiz (ORCPT ); Wed, 20 Aug 2008 04:38:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752158AbYHTIip (ORCPT ); Wed, 20 Aug 2008 04:38:45 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:50905 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751285AbYHTIio (ORCPT ); Wed, 20 Aug 2008 04:38:44 -0400 Date: Wed, 20 Aug 2008 01:37:36 -0700 From: Andrew Morton To: Ian Campbell Cc: Linus Torvalds , Linux Kernel Mailing List , stable@vger.kernel.org, Jaya Kumar , Nick Piggin , Peter Zijlstra , Hugh Dickins , Johannes Weiner , Jeremy Fitzhardinge , Kel Modderman , Markus Armbruster Subject: Re: [PATCH] fbdefio: add set_page_dirty handler to deferred IO FB Message-Id: <20080820013736.ec64baae.akpm@linux-foundation.org> In-Reply-To: <1219220003.3996.29.camel@localhost.localdomain> References: <1219125765-31833-1-git-send-email-ijc@hellion.org.uk> <20080818233824.5d219105.akpm@linux-foundation.org> <1219220003.3996.29.camel@localhost.localdomain> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.5; x86_64-redhat-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 Content-Length: 992 Lines: 26 On Wed, 20 Aug 2008 09:13:23 +0100 Ian Campbell wrote: > Perhaps applying the band-aid at open time instead would be preferred? That would be less racy, I expect. Implement fb_ops.fb_open() within drivers/video/fb_defio.c and do the address_space_operations overwrite there. Hopefully that will ensure that the address_space_operations instance is stable before anyone uses it for anything serious. It'd be better to hook in at inode creation time but afaict that's not available for the /dev/fb0 node. OK, seems that fb_ops.fb_open() has no way of getting at the `struct file *' which is being opened (wtf?). Screwed. Need to change fb_ops.fb_open(), or add a new fb_ops.fb_open_sane(). -- 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/