[PATCH 0/26] get_user_pages() cleanup

Jan Kara jack at suse.cz
Wed Oct 2 16:27:41 CEST 2013


  Hello,

  In my quest for changing locking around page faults to make things easier for
filesystems I found out get_user_pages() users could use a cleanup.  The
knowledge about necessary locking for get_user_pages() is in tons of places in
drivers and quite a few of them actually get it wrong (don't have mmap_sem when
calling get_user_pages() or hold mmap_sem when calling copy_from_user() in the
surrounding code). Rather often this actually doesn't seem necessary. This
patch series converts lots of places to use either get_user_pages_fast()
or a new simple wrapper get_user_pages_unlocked() to remove the knowledge
of mmap_sem from the drivers. I'm still looking into converting a few remaining
drivers (most notably v4l2) which are more complex.

As I already wrote, in some cases I actually think drivers were buggy (and I
note that in corresponding changelogs). I would really like to ask respective
maintainers to have a look at the patches in their area. Also any other
comments are welcome. Thanks.

								Honza

PS: Sorry for the huge recipient list but I don't really know how to trim it
    down...

CC: Alexander Viro <viro at zeniv.linux.org.uk>
CC: Andreas Dilger <andreas.dilger at intel.com>
CC: Andy Walls <awalls at md.metrocast.net>
CC: Arnd Bergmann <arnd at arndb.de>
CC: Benjamin LaHaise <bcrl at kvack.org>
CC: ceph-devel at vger.kernel.org
CC: Dan Williams <dan.j.williams at intel.com>
CC: David Airlie <airlied at linux.ie>
CC: dri-devel at lists.freedesktop.org
CC: Gleb Natapov <gleb at redhat.com>
CC: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
CC: hpdd-discuss at lists.01.org
CC: Jarod Wilson <jarod at wilsonet.com>
CC: Jayant Mangalampalli <jayant.mangalampalli at intel.com>
CC: Jean-Christophe Plagniol-Villard <plagnioj at jcrosoft.com>
CC: Jesper Nilsson <jesper.nilsson at axis.com>
CC: Kai Makisara <Kai.Makisara at kolumbus.fi>
CC: kvm at vger.kernel.org
CC: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
CC: linux-aio at kvack.org
CC: linux-cris-kernel at axis.com
CC: linux-fbdev at vger.kernel.org
CC: linux-fsdevel at vger.kernel.org
CC: linux-ia64 at vger.kernel.org
CC: linux-media at vger.kernel.org
CC: linux-nfs at vger.kernel.org
CC: linux-rdma at vger.kernel.org
CC: linux-scsi at vger.kernel.org
CC: Manu Abraham <abraham.manu at gmail.com>
CC: Mark Allyn <mark.a.allyn at intel.com>
CC: Mikael Starvik <starvik at axis.com>
CC: Mike Marciniszyn <infinipath at intel.com>
CC: Naren Sankar <nsankar at broadcom.com>
CC: Paolo Bonzini <pbonzini at redhat.com>
CC: Peng Tao <tao.peng at emc.com>
CC: Roland Dreier <roland at kernel.org>
CC: Sage Weil <sage at inktank.com>
CC: Scott Davilla <davilla at 4pi.com>
CC: Timur Tabi <timur at freescale.com>
CC: Tomi Valkeinen <tomi.valkeinen at ti.com>
CC: Tony Luck <tony.luck at intel.com>
CC: Trond Myklebust <Trond.Myklebust at netapp.com>


More information about the dri-devel mailing list