This is a note to let you know that I've just added the patch titled
Export 'get_pipe_info()' to other users
to the 2.6.36-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
export-get_pipe_info-to-other-users.patch
and it can be found in the queue-2.6.36 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From c66fb347946ebdd5b10908866ecc9fa05ee2cf3d Mon Sep 17 00:00:00 2001
From: Linus Torvalds <[email protected]>
Date: Sun, 28 Nov 2010 14:09:57 -0800
Subject: Export 'get_pipe_info()' to other users
From: Linus Torvalds <[email protected]>
commit c66fb347946ebdd5b10908866ecc9fa05ee2cf3d upstream.
And in particular, use it in 'pipe_fcntl()'.
The other pipe functions do not need to use the 'careful' version, since
they are only ever called for things that are already known to be pipes.
The normal read/write/ioctl functions are called through the file
operations structures, so if a file isn't a pipe, they'd never get
called. But pipe_fcntl() is special, and called directly from the
generic fcntl code, and needs to use the same careful function that the
splice code is using.
Cc: Jens Axboe <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Dave Jones <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/pipe.c | 2 +-
fs/splice.c | 11 -----------
include/linux/pipe_fs_i.h | 12 ++++++++++++
3 files changed, 13 insertions(+), 12 deletions(-)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -1202,7 +1202,7 @@ long pipe_fcntl(struct file *file, unsig
struct pipe_inode_info *pipe;
long ret;
- pipe = file->f_path.dentry->d_inode->i_pipe;
+ pipe = get_pipe_info(file);
if (!pipe)
return -EBADF;
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1311,17 +1311,6 @@ long do_splice_direct(struct file *in, l
static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe,
struct pipe_inode_info *opipe,
size_t len, unsigned int flags);
-/*
- * After the inode slimming patch, i_pipe/i_bdev/i_cdev share the same
- * location, so checking ->i_pipe is not enough to verify that this is a
- * pipe.
- */
-static inline struct pipe_inode_info *get_pipe_info(struct file *file)
-{
- struct inode *i = file->f_path.dentry->d_inode;
-
- return S_ISFIFO(i->i_mode) ? i->i_pipe : NULL;
-}
/*
* Determine where to splice to/from.
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -161,4 +161,16 @@ void generic_pipe_buf_release(struct pip
/* for F_SETPIPE_SZ and F_GETPIPE_SZ */
long pipe_fcntl(struct file *, unsigned int, unsigned long arg);
+/*
+ * After the inode slimming patch, i_pipe/i_bdev/i_cdev share the same
+ * location, so checking ->i_pipe is not enough to verify that this is a
+ * pipe.
+ */
+static inline struct pipe_inode_info *get_pipe_info(struct file *file)
+{
+ struct inode *i = file->f_path.dentry->d_inode;
+
+ return S_ISFIFO(i->i_mode) ? i->i_pipe : NULL;
+}
+
#endif
Patches currently in stable-queue which might be from
[email protected] are
queue-2.6.36/perf_events-fix-perf_counter_mmap-hook-in-mprotect.patch
queue-2.6.36/drivers-misc-ad525x_dpot.c-fix-typo-in-spi-write16-and-write24-transfer-counts.patch
queue-2.6.36/staging-samsung-laptop-fix-up-some-sysfs-attribute-permissions.patch
queue-2.6.36/staging-asus_oled-fix-up-some-sysfs-attribute-permissions.patch
queue-2.6.36/sgi-xpc-xpc-fails-to-discover-partitions-with-all-nasids-above-128.patch
queue-2.6.36/can-bcm-fix-minor-heap-overflow.patch
queue-2.6.36/um-fix-global-timer-issue-when-using-config_no_hz.patch
queue-2.6.36/drivers-char-vt_ioctl.c-fix-vt_openqry-error-value.patch
queue-2.6.36/hostfs-fix-uml-crash-remove-f_spare-from-hostfs.patch
queue-2.6.36/hpet-fix-unwanted-interrupt-due-to-stale-irq-status-bit.patch
queue-2.6.36/un-inline-get_pipe_info-helper-function.patch
queue-2.6.36/tty-restore-tty_ldisc_wait_idle.patch
queue-2.6.36/nommu-yield-cpu-while-disposing-vm.patch
queue-2.6.36/percpu-fix-list_head-init-bug-in-__percpu_counter_init.patch
queue-2.6.36/usb-misc-usbled-fix-up-some-sysfs-attribute-permissions.patch
queue-2.6.36/mm-vfs-revalidate-page-mapping-in-do_generic_file_read.patch
queue-2.6.36/uml-disable-winch-irq-before-freeing-handler-data.patch
queue-2.6.36/usb-storage-sierra_ms-fix-sysfs-file-attribute.patch
queue-2.6.36/exec-make-argv-envp-memory-visible-to-oom-killer.patch
queue-2.6.36/usb-atm-ueagle-atm-fix-up-some-permissions-on-the-sysfs-files.patch
queue-2.6.36/mm-hugetlb.c-avoid-double-unlock_page-in-hugetlb_fault.patch
queue-2.6.36/um-remove-page_size-alignment-in-linker-script-causing-kernel-segfault.patch
queue-2.6.36/usb-misc-usbsevseg-fix-up-some-sysfs-attribute-permissions.patch
queue-2.6.36/ipc-shm-fix-information-leak-to-userland.patch
queue-2.6.36/do_exit-make-sure-that-we-run-with-get_fs-user_ds.patch
queue-2.6.36/leds-fix-bug-with-reading-nas-ss4200-dmi-code.patch
queue-2.6.36/mm-fix-return-value-of-scan_lru_pages-in-memory-unplug.patch
queue-2.6.36/revert-vfs-show-unreachable-paths-in-getcwd-and-proc.patch
queue-2.6.36/mm-page-allocator-do-not-check-the-state-of-a-non-existant-buddy-during-free.patch
queue-2.6.36/reiserfs-fix-inode-mutex-reiserfs-lock-misordering.patch
queue-2.6.36/staging-frontier-fix-up-some-sysfs-attribute-permissions.patch
queue-2.6.36/ipmi-proper-spinlock-initialization.patch
queue-2.6.36/kfifo-disable-__kfifo_must_check_helper.patch
queue-2.6.36/ipc-initialize-structure-memory-to-zero-for-compat-functions.patch
queue-2.6.36/staging-udlfb-fix-up-some-sysfs-attribute-permissions.patch
queue-2.6.36/export-get_pipe_info-to-other-users.patch
queue-2.6.36/reiserfs-don-t-acquire-lock-recursively-in-reiserfs_acl_chmod.patch
queue-2.6.36/hpet-unmap-unused-i-o-space.patch
queue-2.6.36/acpi-debugfs-custom_method-open-to-non-root.patch
queue-2.6.36/usb-misc-cypress_cy7c63-fix-up-some-sysfs-attribute-permissions.patch
queue-2.6.36/radix-tree-fix-rcu-bug.patch
queue-2.6.36/exec-copy-and-paste-the-fixes-into-compat_do_execve-paths.patch
queue-2.6.36/mm-fix-is_mem_section_removable-page_order-bug_on-check.patch
queue-2.6.36/staging-line6-fix-up-some-sysfs-attribute-permissions.patch
queue-2.6.36/fuse-fix-attributes-after-open-o_trunc.patch
queue-2.6.36/rename-pipe_info-to-get_pipe_info.patch
queue-2.6.36/backlight-grab-ops_lock-before-testing-bd-ops.patch
queue-2.6.36/memcg-avoid-deadlock-between-move-charge-and-try_charge.patch
queue-2.6.36/cs5535-gpio-apply-cs5536-errata-workaround-for-gpios.patch
queue-2.6.36/numa-fix-slab_node-mpol_bind.patch
queue-2.6.36/latencytop-fix-per-task-accumulator.patch
queue-2.6.36/mm-hugetlb.c-add-missing-spin_lock-to-hugetlb_cow.patch
queue-2.6.36/net-truncate-recvfrom-and-sendto-length-to-int_max.patch
queue-2.6.36/usb-misc-trancevibrator-fix-up-a-sysfs-attribute-permission.patch
queue-2.6.36/usb-ehci-fix-debugfs-lpm-permissions.patch
queue-2.6.36/staging-iio-adis16220-fix-up-some-sysfs-attribute-permissions.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable