aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-05-28sched: More sched_domain iterations fixesXiaotian Feng2-4/+10
sched_domain iterations needs to be protected by rcu_read_lock() now, this patch adds another two places which needs the rcu lock, which is spotted by following suspicious rcu_dereference_check() usage warnings. kernel/sched_rt.c:1244 invoked rcu_dereference_check() without protection! kernel/sched_stats.h:41 invoked rcu_dereference_check() without protection! Signed-off-by: Xiaotian Feng <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-05-28nbd: adjust 'max_part' according to part_shiftNamhyung Kim1-1/+12
The 'max_part' parameter determines how many partitions are supported on each nbd device. However the actual number can be changed to the power of 2 minus 1 form during the module initialization as alloc_disk() is called with (1 << part_shift) for some reason. So adjust 'max_part' also at least for consistency with loop and brd. It is exported via sysfs already, and a user should check this value after module loading if [s]he wants to use that number correctly (i.e. fdisk or something). Signed-off-by: Namhyung Kim <[email protected]> Cc: Laurent Vivier <[email protected]> Cc: Paul Clements <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2011-05-28nbd: limit module parameters to a sane valueNamhyung Kim1-0/+6
The 'max_part' parameter controls the number of maximum partition a nbd device can have. However if a user specifies very large value it would exceed the limitation of device minor number and can cause a kernel oops (or, at least, produce invalid device nodes in some cases). In addition, specifying large 'nbds_max' value causes same problem for the same reason. On my desktop, following command results to the kernel bug: $ sudo modprobe nbd max_part=100000 kernel BUG at /media/Linux_Data/project/linux/fs/sysfs/group.c:65! invalid opcode: 0000 [#1] SMP last sysfs file: /sys/devices/virtual/block/nbd4/range CPU 1 Modules linked in: nbd(+) bridge stp llc kvm_intel kvm asus_atk0110 sg sr_mod cdrom Pid: 2522, comm: modprobe Tainted: G W 2.6.39-leonard+ #159 System manufacturer System Product Name/P5G41TD-M PRO RIP: 0010:[<ffffffff8115aa08>] [<ffffffff8115aa08>] internal_create_group+0x2f/0x166 RSP: 0018:ffff8801009f1de8 EFLAGS: 00010246 RAX: 00000000ffffffef RBX: ffff880103920478 RCX: 00000000000a7bd3 RDX: ffffffff81a2dbe0 RSI: 0000000000000000 RDI: ffff880103920478 RBP: ffff8801009f1e38 R08: ffff880103920468 R09: ffff880103920478 R10: ffff8801009f1de8 R11: ffff88011eccbb68 R12: ffffffff81a2dbe0 R13: ffff880103920468 R14: 0000000000000000 R15: ffff880103920400 FS: 00007f3c49de9700(0000) GS:ffff88011f800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007f3b7fe7c000 CR3: 00000000cd58d000 CR4: 00000000000406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process modprobe (pid: 2522, threadinfo ffff8801009f0000, task ffff8801009a93a0) Stack: ffff8801009f1e58 ffffffff812e8f6e ffff8801009f1e58 ffffffff812e7a80 ffff880000000010 ffff880103920400 ffff8801002fd0c0 ffff880103920468 0000000000000011 ffff880103920400 ffff8801009f1e48 ffffffff8115ab6a Call Trace: [<ffffffff812e8f6e>] ? device_add+0x4f1/0x5e4 [<ffffffff812e7a80>] ? dev_set_name+0x41/0x43 [<ffffffff8115ab6a>] sysfs_create_group+0x13/0x15 [<ffffffff810b857e>] blk_trace_init_sysfs+0x14/0x16 [<ffffffff811ee58b>] blk_register_queue+0x4c/0xfd [<ffffffff811f3bdf>] add_disk+0xe4/0x29c [<ffffffffa007e2ab>] nbd_init+0x2ab/0x30d [nbd] [<ffffffffa007e000>] ? 0xffffffffa007dfff [<ffffffff8100020f>] do_one_initcall+0x7f/0x13e [<ffffffff8107ab0a>] sys_init_module+0xa1/0x1e3 [<ffffffff814f3542>] system_call_fastpath+0x16/0x1b Code: 41 57 41 56 41 55 41 54 53 48 83 ec 28 0f 1f 44 00 00 48 89 fb 41 89 f6 49 89 d4 48 85 ff 74 0b 85 f6 75 0b 48 83 7f 30 00 75 14 <0f> 0b eb fe b9 ea ff ff ff 48 83 7f 30 00 0f 84 09 01 00 00 49 RIP [<ffffffff8115aa08>] internal_create_group+0x2f/0x166 RSP <ffff8801009f1de8> ---[ end trace 753285ffbf72c57c ]--- Signed-off-by: Namhyung Kim <[email protected]> Cc: Laurent Vivier <[email protected]> Cc: Paul Clements <[email protected]> Cc: [email protected] Signed-off-by: Jens Axboe <[email protected]>
2011-05-28nbd: pass MSG_* flags to kernel_recvmsg()Namhyung Kim1-1/+2
Unlike kernel_sendmsg(), kernel_recvmsg() requires passing flags explicitly via last parameter instead of struct msghdr.msg_flags. Therefore calls to sock_xmit(lo, 0, ..., MSG_WAITALL) have not been processed properly by tcp layer wrt. the flag. Fix it. Signed-off-by: Namhyung Kim <[email protected]> Cc: Paul Clements <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2011-05-28block: improve the bio_add_page() and bio_add_pc_page() descriptionsAndreas Gruenbacher1-8/+8
The descriptions of bio_add_page() and bio_add_pc_page() are slightly inconsistent; improve them. Signed-off-by: Andreas Gruenbacher <[email protected]> Cc: Jens Axboe <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2011-05-28Merge branch 'for-chris' ofChris Mason15-385/+474
git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work into for-linus Conflicts: fs/btrfs/disk-io.c fs/btrfs/extent-tree.c fs/btrfs/free-space-cache.c fs/btrfs/inode.c fs/btrfs/transaction.c Signed-off-by: Chris Mason <[email protected]>
2011-05-28mfd: Fix build breakage caused by tps65910 gpio directory moveLiam Girdwood1-1/+1
Signed-off-by: Liam Girdwood <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-28mfd: Use mfd cell platform_data for db8500-prcmu cells platform bitsMattias Wallin1-1/+2
With the addition of a device platform mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers. Signed-off-by: Mattias Wallin <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-27Merge branch 'for_2.6.40/gpio-move' of ↵Grant Likely4-106/+105
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into gpio/next
2011-05-28fs: block_page_mkwrite should wait for writeback to finishDarrick J. Wong1-0/+1
For filesystems such as nilfs2 and xfs that use block_page_mkwrite, modify that function to wait for pending writeback before allowing the page to become writable. This is needed to stabilize pages during writeback for those two filesystems. Signed-off-by: Darrick J. Wong <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28mm: Wait for writeback when grabbing pages to begin a writeDarrick J. Wong1-1/+3
When grabbing a page for a buffered IO write, the mm should wait for writeback on the page to complete so that the page does not become writable during the IO operation. This change is needed to provide page stability during writes for all filesystems. Signed-off-by: Darrick J. Wong <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28configfs: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-2/+0
configfs does not have problems with references to unlinked directories. CC: Joel Becker <[email protected]> Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28fat: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil2-10/+0
fat does not have problems with references to unlinked directories. CC: OGAWA Hirofumi <[email protected]> Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28hpfs: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-5/+0
Hpfs has no problems with references to unlinked directories. We leave one dentry_unhash call in place, in hpfs_unlink's strange path where it tries to truncate a file because the disk is full. I'm not sure what the full story is there. CC: Mikulas Patocka <[email protected]> Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28minix: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-5/+0
Minix has no issues with references to unlinked directories. Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28fuse: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-5/+0
Fuse has no problems with references to unlinked directories. CC: Miklos Szeredi <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28coda: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-5/+0
Coda has no problems with references to unlinked directories. CC: Jan Harkes <[email protected]> CC: [email protected] CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28afs: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-5/+0
afs has no problems with references to unlinked directories. CC: David Howells <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28affs: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-5/+0
affs has no problems with references to unlinked directories. Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-289p: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-4/+0
9p has no problems with references to unlinked directories. CC: Eric Van Hensbergen <[email protected]> CC: Ron Minnich <[email protected]> CC: Latchesar Ionkov <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28ncpfs: fix rename over directory with dangling referencesSage Weil1-1/+9
ncpfs does not handle references to unlinked directories (or so it would seem given the ncp_rmdir check). Since it is also possible to rename over an empty directory, perform the same check here. CC: Petr Vandrovec <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28ncpfs: document dentry_unhash usageSage Weil1-1/+4
ncpfs returns EBUSY if there are any references to the directory. The dentry_unhash call only unhashes the dentry if there are no references. CC: Petr Vandrovec <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28ecryptfs: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-5/+0
ecryptfs does not have problems with references to unlinked directories. CC: Tyler Hicks <[email protected]> CC: Dustin Kirkland <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28hostfs: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-5/+0
hostfs does not have problems with references to unlinked directories. CC: Jeff Dike <[email protected]> CC: Richard Weinberger <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28hfsplus: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-6/+2
hfsplus does not have problems with references to unlinked directories. Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28hfs: remove unnecessary dentry_unhash on rmdir, dir renameSage Weil1-6/+0
hfs does not have problems with references to unlinked directories. Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28omfs: remove unnecessary dentry_unhash on rmdir, dir rneameSage Weil1-8/+3
omfs does not have problems with references to unlinked directories. CC: Bob Copeland <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28udf: remove unnecessary dentry_unhash from rmdir, dir renameSage Weil1-5/+0
udf does not have problems with references to unlinked directories. CC: Jan Kara <[email protected]> Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28reiserfs: remove unnecessary dentry_unhash from rmdir, dir renameSage Weil2-6/+0
Reiserfs does not have problems with references to unlinked directories. CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28ufs: remove unnecessary dentry_unhash from rmdir, dir renameSage Weil1-5/+0
ufs does not have problems with references to unlinked directories. CC: Evgeniy Dushistov <[email protected]> Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28ubifs: remove unnecessary dentry_unhash from rmdir, dir renameSage Weil1-5/+0
ubifs does not have problems with references to unlinked directories. CC: Artem Bityutskiy <[email protected]> CC: Adrian Hunter <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28nilfs2: remove unnecessary dentry_unhash from rmdir, dir renameSage Weil1-5/+0
nilfs2 does not have problems with references to unlinked directories. CC: KONISHI Ryusuke <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28logfs: remove unnecessary dentry_unhash from rmdir, dir renameSage Weil1-5/+0
logfs does not have problems with references to unlinked directories. CC: Joern Engel <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28jfs: remove unnecessary dentry_unhash from rmdir, dir renameSage Weil1-5/+0
jfs does not have problems with references to unlinked directories. CC: Dave Kleikamp <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28jffs2: remove unnecessary dentry_unhash from rmdir, dir renameSage Weil1-5/+0
jffs2 does not have problems with references to unlinked directories. CC: David Woodhouse <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28sysv: remove unnecessary dentry_unhash from rmdir, dir renameSage Weil1-5/+0
sysv does not have problems with references to unlinked directories. CC: Christoph Hellwig <[email protected]> Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-28bfs: remove unnecessary dentry_unhash on dir renameSage Weil1-3/+0
Bfs does not have problems with references to unlinked directories. CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-27x86: Put back -pg to tsc.o and add no GCOV to vread_tsc_64.oSteven Rostedt1-0/+2
The commit 44259b1abfaa8bb819d25d41d71e8e33e25dd36a Author: Andy Lutomirski <[email protected]> x86-64: Move vread_tsc into a new file with sensible options Removed the -pg from tsc.o which caused the function graph tracer to go into an infinite function call recursion as it uses the tsc internally outside its recursion protection, thus tracing the tsc breaks the function graph tracer. This commit also added the file vread_tsc_64.c that gets used by vdso but failed to prevent GCOV from monkeying with it, causing userspace to try to access kernel data when GCOV was enabled. Thanks to Thomas Gleixner for pointing out GCOV as the likely culprit that added strange kernel accesses into the vread_tsc() call. Cc: Author: Andy Lutomirski <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2011-05-27Merge git://git.infradead.org/mtd-2.6Linus Torvalds152-1690/+1041
* git://git.infradead.org/mtd-2.6: (97 commits) mtd: kill CONFIG_MTD_PARTITIONS mtd: remove add_mtd_partitions, add_mtd_device and friends mtd: convert remaining users to mtd_device_register() mtd: samsung onenand: convert to mtd_device_register() mtd: omap2 onenand: convert to mtd_device_register() mtd: txx9ndfmc: convert to mtd_device_register() mtd: tmio_nand: convert to mtd_device_register() mtd: socrates_nand: convert to mtd_device_register() mtd: sharpsl: convert to mtd_device_register() mtd: s3c2410 nand: convert to mtd_device_register() mtd: ppchameleonevb: convert to mtd_device_register() mtd: orion_nand: convert to mtd_device_register() mtd: omap2: convert to mtd_device_register() mtd: nomadik_nand: convert to mtd_device_register() mtd: ndfc: convert to mtd_device_register() mtd: mxc_nand: convert to mtd_device_register() mtd: mpc5121_nfc: convert to mtd_device_register() mtd: jz4740_nand: convert to mtd_device_register() mtd: h1910: convert to mtd_device_register() mtd: fsmc_nand: convert to mtd_device_register() ... Fixed up trivial conflicts in - drivers/mtd/maps/integrator-flash.c: removed in ARM tree - drivers/mtd/maps/physmap.c: addition of afs partition probe type clashing with removal of CONFIG_MTD_PARTITIONS
2011-05-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds79-1225/+5888
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (60 commits) [SCSI] lpfc 8.3.24: Extend BSG infrastructure and add link diagnostics [SCSI] lpfc 8.3.24: Add resource extent support [SCSI] lpfc 8.3.24: Add request-firmware support [SCSI] lpfc 8.3.24: Add SR-IOV control [SCSI] lpfc 8.3.24: Extended hardware support and support dump images [SCSI] lpfc 8.3.24: Miscellaneous Fixes and Corrections [SCSI] libsas: Add option for SATA soft reset [SCSI] libsas: check dev->gone before submitting sata i/o [SCSI] libsas: fix/amend device gone notification in sas_deform_port() [SCSI] MAINTAINERS update for SCSI (new email address) [SCSI] Fix Ultrastor asm snippet [SCSI] osst: fix warning [SCSI] osst: wrong index used in inner loop [SCSI] aic94xx: world-writable sysfs update_bios file [SCSI] MAINTAINERS: Add drivers/target/ entry [SCSI] target: Convert TASK_ATTR to scsi_tcq.h definitions [SCSI] target: Convert REPORT_LUNs to use int_to_scsilun [SCSI] target: Fix task->task_execute_queue=1 clear bug + LUN_RESET OOPs [SCSI] target: Fix bug with task_sg chained transport_free_dev_tasks release [SCSI] target: Fix interrupt context bug with stats_lock and core_tmr_alloc_req ...
2011-05-27Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds200-6135/+1611
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (45 commits) ARM: 6945/1: Add unwinding support for division functions ARM: kill pmd_off() ARM: 6944/1: mm: allow ASID 0 to be allocated to tasks ARM: 6943/1: mm: use TTBR1 instead of reserved context ID ARM: 6942/1: mm: make TTBR1 always point to swapper_pg_dir on ARMv6/7 ARM: 6941/1: cache: ensure MVA is cacheline aligned in flush_kern_dcache_area ARM: add sendmmsg syscall ARM: 6863/1: allow hotplug on msm ARM: 6832/1: mmci: support for ST-Ericsson db8500v2 ARM: 6830/1: mach-ux500: force PrimeCell revisions ARM: 6829/1: amba: make hardcoded periphid override hardware ARM: 6828/1: mach-ux500: delete SSP PrimeCell ID ARM: 6827/1: mach-netx: delete hardcoded periphid ARM: 6940/1: fiq: Briefly document driver responsibilities for suspend/resume ARM: 6938/1: fiq: Refactor {get,set}_fiq_regs() for Thumb-2 ARM: 6914/1: sparsemem: fix highmem detection when using SPARSEMEM ARM: 6913/1: sparsemem: allow pfn_valid to be overridden when using SPARSEMEM at91: drop at572d940hf support at91rm9200: introduce at91rm9200_set_type to specficy cpu package at91: drop boot_params and PLAT_PHYS_OFFSET ...
2011-05-27ALSA: fix hda AZX_DCAPS_NO_TCSEL quirk check in driver_capsLinus Torvalds1-1/+1
Commit 9477c58e3308 ("ALSA: hda - Reorganize controller quriks with bit flags") changed the driver type compares into various quirk bits. However, the check for AZX_DCAPS_NO_TCSEL got reverted: instead of clearing TCSEL for chipsets that have that standard capability, it cleared then when the NO_TCSEL bit was set. This can lead to noise and repeated sounds - a weird "echo" behavior. As the comment just above says: "Ensuring these bits are 0 clears playback static on some HD Audio codecs". Which is definitely true at least on my Core i5 Westmere system. Cc: Takashi Iwai <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-27gpio/pch_gpio: Support new device ML7223Tomoya MORINAGA2-1/+9
Support new device OKI SEMICONDUCTOR ML7223 IOH(Input/Output Hub). The ML7223 IOH is for MP(Media Phone) use. The ML7223 is companion chip for Intel Atom E6xx series. The ML7223 is completely compatible for Intel EG20T PCH. Signed-off-by: Tomoya MORINAGA <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2011-05-27gpio: make gpio_{request,free}_array gpio array parameter constLars-Peter Clausen3-6/+6
gpio_{request,free}_array should not (and do not) modify the passed gpio array, so make the parameter const. Signed-off-by: Lars-Peter Clausen <[email protected]> Acked-by: Eric Miao <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2011-05-27Merge branches 'devel', 'devel-stable' and 'fixes' into for-linusRussell King188-6043/+1455
2011-05-27ARM: 6945/1: Add unwinding support for division functionsLaura Abbott1-5/+20
The software division functions never had unwinding annotations added. Currently, when a division by zero occurs the backtrace shown will stop at Ldiv0 or some completely unrelated function. Add unwinding annotations in hopes of getting a more useful backtrace when a division by zero occurs. Signed-off-by: Laura Abbott <[email protected]> Acked-by: Dave Martin <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-05-27SUNRPC: Support for RPC over AF_LOCAL transportsChuck Lever4-4/+403
TI-RPC introduces the capability of performing RPC over AF_LOCAL sockets. It uses this mainly for registering and unregistering local RPC services securely with the local rpcbind, but we could also conceivably use it as a generic upcall mechanism. This patch provides a client-side only implementation for the moment. We might also consider a server-side implementation to provide AF_LOCAL access to NLM (for statd downcalls, and such like). Autobinding is not supported on kernel AF_LOCAL transports at this time. Kernel ULPs must specify the pathname of the remote endpoint when an AF_LOCAL transport is created. rpcbind supports registering services available via AF_LOCAL, so the kernel could handle it with some adjustment to ->rpcbind and ->set_port. But we don't need this feature for doing upcalls via well-known named sockets. This has not been tested with ULPs that move a substantial amount of data. Thus, I can't attest to how robust the write_space and congestion management logic is. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-05-27SUNRPC: Remove obsolete commentChuck Lever1-4/+0
Clean up. The documenting comment at the top of net/sunrpc/clnt.c is out of date. We adopted BSD's RTO estimation mechanism years ago. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-05-27SUNRPC: Use AF_LOCAL for rpcbind upcallsChuck Lever2-14/+85
As libtirpc does in user space, have our registration API try using an AF_LOCAL transport first when registering and unregistering. This means we don't chew up privileged ports, and our registration is bound to an "owner" (the effective uid of the process on the sending end of the transport). Only that "owner" may unregister the service. The kernel could probe rpcbind via an rpcbind query to determine whether rpcbind has an AF_LOCAL service. For simplicity, we use the same technique that libtirpc uses: simply fail over to network loopback if creating an AF_LOCAL transport to the well-known rpcbind service socket fails. This means we open-code the pathname of the rpcbind socket in the kernel. For now we have to do that anyway because the kernel's RPC over AF_LOCAL implementation does not support autobind. That may be undesirable in the long term. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-05-27SUNRPC: Clean up use of curly braces in switch casesChuck Lever1-9/+8
Clean up. Preferred style is not to use curly braces around switch cases. I'm about to add another case that needs a third type cast. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>