<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/char/raw.c, branch v3.5.1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/char/raw.c?h=v3.5.1</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/char/raw.c?h=v3.5.1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-04T03:54:55Z</updated>
<entry>
<title>switch device_get_devnode() and -&gt;devnode() to umode_t *</title>
<updated>2012-01-04T03:54:55Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-07-24T00:24:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2c9ede55ecec58099b72e4bb8eab719f32f72c31'/>
<id>urn:sha1:2c9ede55ecec58099b72e4bb8eab719f32f72c31</id>
<content type='text'>
both callers of device_get_devnode() are only interested in lower 16bits
and nobody tries to return anything wider than 16bit anyway.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>char: Convert vmalloc/memset to vzalloc</title>
<updated>2011-09-15T11:55:03Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-05-28T17:36:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8e03bd6525d3281068519d5f6059cdcc5a67af66'/>
<id>urn:sha1:8e03bd6525d3281068519d5f6059cdcc5a67af66</id>
<content type='text'>
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>RAW driver: Remove call to kobject_put().</title>
<updated>2011-05-07T00:52:32Z</updated>
<author>
<name>Robert P. J. Day</name>
<email>rpjday@crashcourse.ca</email>
</author>
<published>2011-05-04T09:19:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9333744dc7dcd85531cff13cabf1d5d6baf18e7d'/>
<id>urn:sha1:9333744dc7dcd85531cff13cabf1d5d6baf18e7d</id>
<content type='text'>
If cdev_add() fails, there is no justification for subsequently
calling kobject_put().

Signed-off-by: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Allow setting of number of raw devices as a module parameter</title>
<updated>2011-05-07T00:52:31Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2011-04-28T22:24:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0078bff5283d1fd6417b840eda6dab912b7a5560'/>
<id>urn:sha1:0078bff5283d1fd6417b840eda6dab912b7a5560</id>
<content type='text'>
Allow setting of maximal number of raw devices as a module parameter. This
requires changing of static array into a vmalloced one (the array is going to
be too large for kmalloc).

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>block: make blkdev_get/put() handle exclusive access</title>
<updated>2010-11-13T10:55:17Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-11-13T10:55:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e525fd89d380c4a94c0d63913a1dd1a593ed25e7'/>
<id>urn:sha1:e525fd89d380c4a94c0d63913a1dd1a593ed25e7</id>
<content type='text'>
Over time, block layer has accumulated a set of APIs dealing with bdev
open, close, claim and release.

* blkdev_get/put() are the primary open and close functions.

* bd_claim/release() deal with exclusive open.

* open/close_bdev_exclusive() are combination of open and claim and
  the other way around, respectively.

* bd_link/unlink_disk_holder() to create and remove holder/slave
  symlinks.

* open_by_devnum() wraps bdget() + blkdev_get().

The interface is a bit confusing and the decoupling of open and claim
makes it impossible to properly guarantee exclusive access as
in-kernel open + claim sequence can disturb the existing exclusive
open even before the block layer knows the current open if for another
exclusive access.  Reorganize the interface such that,

* blkdev_get() is extended to include exclusive access management.
  @holder argument is added and, if is @FMODE_EXCL specified, it will
  gain exclusive access atomically w.r.t. other exclusive accesses.

* blkdev_put() is similarly extended.  It now takes @mode argument and
  if @FMODE_EXCL is set, it releases an exclusive access.  Also, when
  the last exclusive claim is released, the holder/slave symlinks are
  removed automatically.

* bd_claim/release() and close_bdev_exclusive() are no longer
  necessary and either made static or removed.

* bd_link_disk_holder() remains the same but bd_unlink_disk_holder()
  is no longer necessary and removed.

* open_bdev_exclusive() becomes a simple wrapper around lookup_bdev()
  and blkdev_get().  It also has an unexpected extra bdev_read_only()
  test which probably should be moved into blkdev_get().

* open_by_devnum() is modified to take @holder argument and pass it to
  blkdev_get().

Most of bdev open/close operations are unified into blkdev_get/put()
and most exclusive accesses are tested atomically at the open time (as
it should).  This cleans up code and removes some, both valid and
invalid, but unnecessary all the same, corner cases.

open_bdev_exclusive() and open_by_devnum() can use further cleanup -
rename to blkdev_get_by_path() and blkdev_get_by_devt() and drop
special features.  Well, let's leave them for another day.

Most conversions are straight-forward.  drbd conversion is a bit more
involved as there was some reordering, but the logic should stay the
same.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Neil Brown &lt;neilb@suse.de&gt;
Acked-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Acked-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Acked-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Cc: Peter Osterlund &lt;petero2@telia.com&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Jan Kara &lt;jack@suse.cz&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Andreas Dilger &lt;adilger.kernel@dilger.ca&gt;
Cc: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;joel.becker@oracle.com&gt;
Cc: Alex Elder &lt;aelder@sgi.com&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: dm-devel@redhat.com
Cc: drbd-dev@lists.linbit.com
Cc: Leo Chen &lt;leochen@broadcom.com&gt;
Cc: Scott Branden &lt;sbranden@broadcom.com&gt;
Cc: Chris Mason &lt;chris.mason@oracle.com&gt;
Cc: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: Dave Kleikamp &lt;shaggy@linux.vnet.ibm.com&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Cc: reiserfs-devel@vger.kernel.org
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl</title>
<updated>2010-10-22T17:52:56Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-22T17:52:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=092e0e7e520a1fca03e13c9f2d157432a8657ff2'/>
<id>urn:sha1:092e0e7e520a1fca03e13c9f2d157432a8657ff2</id>
<content type='text'>
* 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
  vfs: make no_llseek the default
  vfs: don't use BKL in default_llseek
  llseek: automatically add .llseek fop
  libfs: use generic_file_llseek for simple_attr
  mac80211: disallow seeks in minstrel debug code
  lirc: make chardev nonseekable
  viotape: use noop_llseek
  raw: use explicit llseek file operations
  ibmasmfs: use generic_file_llseek
  spufs: use llseek in all file operations
  arm/omap: use generic_file_llseek in iommu_debug
  lkdtm: use generic_file_llseek in debugfs
  net/wireless: use generic_file_llseek in debugfs
  drm: use noop_llseek
</content>
</entry>
<entry>
<title>fix rawctl compat ioctls breakage on amd64 and itanic</title>
<updated>2010-10-19T09:29:54Z</updated>
<author>
<name>Al Viro</name>
<email>viro@ZenIV.linux.org.uk</email>
</author>
<published>2009-08-24T22:42:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c4a047272566b44b44222369d50a307c708c4f74'/>
<id>urn:sha1:c4a047272566b44b44222369d50a307c708c4f74</id>
<content type='text'>
RAW_SETBIND and RAW_GETBIND 32bit versions are fscked in interesting ways.

1) fs/compat_ioctl.c has COMPATIBLE_IOCTL(RAW_SETBIND) followed by
HANDLE_IOCTL(RAW_SETBIND, raw_ioctl).  The latter is ignored.

2) on amd64 (and itanic) the damn thing is broken - we have int + u64 + u64
and layouts on i386 and amd64 are _not_ the same.  raw_ioctl() would
work there, but it's never called due to (1).  As it is, i386 /sbin/raw
definitely doesn't work on amd64 boxen.

3) switching to raw_ioctl() as is would *not* work on e.g. sparc64 and ppc64,
which would be rather sad, seeing that normal userland there is 32bit.
The thing is, slapping __packed on the struct in question does not DTRT -
it eliminates *all* padding.  The real solution is to use compat_u64.

4) of course, all that stuff has no business being outside of raw.c in the
first place - there should be -&gt;compat_ioctl() for /dev/rawctl instead of
messing with compat_ioctl.c.

[akpm@linux-foundation.org: coding-style fixes]
[arnd@arndb.de: port to 2.6.36]
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>raw: use explicit llseek file operations</title>
<updated>2010-09-16T08:33:14Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2010-07-06T21:03:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cb3b9cf818070df1bf592b71275bcf99d8edefcb'/>
<id>urn:sha1:cb3b9cf818070df1bf592b71275bcf99d8edefcb</id>
<content type='text'>
The raw_fops may need to seek, so there should
be an explicit reference to default_llseek.
raw_ctl_fops does not contain a read or write
method, so we use noop_llseek to ignore seeking
requests without an error.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>drivers: Push down BKL into various drivers</title>
<updated>2010-05-17T03:27:41Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2010-04-26T22:24:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=55929332c92e5d34d65a8f784604c92677ea3e15'/>
<id>urn:sha1:55929332c92e5d34d65a8f784604c92677ea3e15</id>
<content type='text'>
These are the last remaining device drivers using
the -&gt;ioctl file operation in the drivers directory
(except from v4l drivers).

[fweisbec: drop i8k pushdown as it has been done from
procfs pushdown branch already]

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
</content>
</entry>
<entry>
<title>vfs: rename block_fsync() to blkdev_fsync()</title>
<updated>2010-04-07T15:38:04Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2010-04-06T21:35:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b1dd3b2843b3b73b7fc2ee47d96310cd1c051371'/>
<id>urn:sha1:b1dd3b2843b3b73b7fc2ee47d96310cd1c051371</id>
<content type='text'>
Requested by hch, for consistency now it is exported.

Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Anton Blanchard &lt;anton@samba.org&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Jan Kara &lt;jack@suse.cz&gt;
Cc: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
