aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgrp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-09-03Merge tag 'tty-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/ttyLinus Torvalds1-0/+2
Pull tty/serial driver patches from Greg KH: "Here's the big tty/serial driver pull request for 3.12-rc1. Lots of n_tty reworks to resolve some very long-standing issues, removing the 3-4 different locks that were taken for every character. This code has been beaten on for a long time in linux-next with no reported regressions. Other than that, a range of serial and tty driver updates and revisions. Full details in the shortlog" * tag 'tty-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (226 commits) hvc_xen: Remove unnecessary __GFP_ZERO from kzalloc serial: imx: initialize the local variable tty: ar933x_uart: add device tree support and binding documentation tty: ar933x_uart: allow to build the driver as a module ARM: dts: msm: Update uartdm compatible strings devicetree: serial: Document msm_serial bindings serial: unify serial bindings into a single dir serial: fsl-imx-uart: Cleanup duplicate device tree binding tty: ar933x_uart: use config_enabled() macro to clean up ifdefs tty: ar933x_uart: remove superfluous assignment of ar933x_uart_driver.nr tty: ar933x_uart: use the clk API to get the uart clock tty: serial: cpm_uart: Adding proper request of GPIO used by cpm_uart driver serial: sirf: fix the amount of serial ports serial: sirf: define macro for some magic numbers of USP serial: icom: move array overflow checks earlier TTY: amiserial, remove unnecessary platform_set_drvdata() serial: st-asc: remove unnecessary platform_set_drvdata() msm_serial: Send more than 1 character on the console w/ UARTDM msm_serial: Add support for non-GSBI UARTDM devices msm_serial: Switch clock consumer strings and simplify code ...
2013-08-19staging: dgrp: add __init/__exit macrosnavin patidar1-9/+5
add __init/__exit macros to related init/cleanup functions. Signed-off-by: navin patidar <navinp@cdac.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23tty: Ensure single-threaded flip buffer consumer with mutexPeter Hurley1-0/+2
The buffer work may race with parallel tty_buffer_flush. Use a mutex to guarantee exclusive modify access to the head flip buffer. Remove the unneeded spin lock. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-03drivers: avoid format string in dev_set_nameKees Cook1-1/+1
Calling dev_set_name with a single paramter causes it to be handled as a format string. Many callers are passing potentially dynamic string content, so use "%s" in those cases to avoid any potential accidents, including wrappers like device_create*() and bdi_register(). Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-06-08drivers: staging: dgrp: using time_is_before_jiffies() instead of open coding 'jiffies'Chen Gang1-1/+1
Need use the proper jiffy comparison macros/functions instead of open coding 'jiffies'. The original 'comparation' is always true. The related warning (with 'EXTRA_CFLAGS=-W') drivers/staging/dgrp/dgrp_net_ops.c:1610:10: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13staging: for dgrp, let nd_ps_desc always NUL terminated string within MAX_DESC_LEN lengthChen Gang3-3/+3
Use strlcpy instead of strncpy to let nd_ps_desc always NUL terminated. Change nd_ps_desc in nd_struct struct to MAX_DESC_LEN to avoid the confusion (the related length checking also need be changed to MAX_DESC_LEN - 1). Signed-off-by: Chen Gang <gang.chen@asianux.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13staging: dgrp: Fixed warning 'space prohibited before semicolon'Tülin İzer1-1/+1
This patch fixes warning 'space prohibited before semicolon' in driver dgrp. Signed-off-by: Tülin İzer <tulinizer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-01Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfsLinus Torvalds7-529/+69
Pull VFS updates from Al Viro, Misc cleanups all over the place, mainly wrt /proc interfaces (switch create_proc_entry to proc_create(), get rid of the deprecated create_proc_read_entry() in favor of using proc_create_data() and seq_file etc). 7kloc removed. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits) don't bother with deferred freeing of fdtables proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h proc: Make the PROC_I() and PDE() macros internal to procfs proc: Supply a function to remove a proc entry by PDE take cgroup_open() and cpuset_open() to fs/proc/base.c ppc: Clean up scanlog ppc: Clean up rtas_flash driver somewhat hostap: proc: Use remove_proc_subtree() drm: proc: Use remove_proc_subtree() drm: proc: Use minor->index to label things, not PDE->name drm: Constify drm_proc_list[] zoran: Don't print proc_dir_entry data in debug reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show() proc: Supply an accessor for getting the data from a PDE's parent airo: Use remove_proc_subtree() rtl8192u: Don't need to save device proc dir PDE rtl8187se: Use a dir under /proc/net/r8180/ proc: Add proc_mkdir_data() proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h} proc: Move PDE_NET() to fs/proc/proc_net.c ...
2013-04-29Include missing linux/slab.h inclusionsDavid Howells4-1/+4
Include missing linux/slab.h inclusions where the source file is currently expecting to get kmalloc() and co. through linux/proc_fs.h. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> cc: linux-s390@vger.kernel.org cc: sparclinux@vger.kernel.org cc: linux-efi@vger.kernel.org cc: linux-mtd@lists.infradead.org cc: devel@driverdev.osuosl.org cc: x86@kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-22staging: dgrp: info leak in dgrp_dpa_ioctl()Dan Carpenter1-0/+1
If "nd->nd_vpd_len" is less than 512 then the last part of the "vpd.vpd_data" has uninitialized stack information. We need to clear it before copying the buffer to user space. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-09constify a bunch of struct file_operations instancesAl Viro1-3/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09procfs: new helper - PDE_DATA(inode)Al Viro4-25/+4
The only part of proc_dir_entry the code outside of fs/proc really cares about is PDE(inode)->data. Provide a helper for that; static inline for now, eventually will be moved to fs/proc, along with the knowledge of struct proc_dir_entry layout. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09dgrp procfs fixes, part 6: just use proc_create{,_data}Al Viro3-65/+4
->permission() of its own is a rudiment of sysctl imitation; normal procfs logics will do just fine here, no need to mess with ->proc_iops at all. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09dgrp procfs fixes, part 5: per-node filesAl Viro6-129/+45
this "hooks" scheme is pointless - just make file_operations non-static and consolidate initialiazation bits. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09dgrp procfs fixes, part 4: get rid of sysctl-like machineryAl Viro2-270/+42
racy and very overblown... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09dgrp procfs fixes, part 3: kill dead codeAl Viro1-63/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09dgrp procfs fixes, part 2Al Viro1-4/+1
All table entries either have non-NULL ->proc_file_fops or non-NULL child. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09dgrp procfs fixes, part 1Al Viro1-2/+1
proc_create() has shat upon fops argument when mode is S_IFDIR. Good thing, too, since fops passed to it is completely useless for any directory. Just use proc_mkdir(), damnit. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09mode_t, whack-a-mole at 11...Al Viro2-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-05staging: dgrp: implement error handling in dgrp_create_class_sysfs_files()Alexey Khoroshilov3-7/+31
There is no any error handling in dgrp_create_class_sysfs_files(). The patch adds code to check return values and propagate them to dgrp_init_module(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-14staging: dgrp: cleanup sparse warningsNathan Zimmer5-6/+8
A cleanup patch to remove sparse warnings caused by my other patch "procfs: Improve Scaling in proc" since now proc_fops is protected by the rcu. Signed-off-by: Nathan Zimmer <nzimmer@sgi.com> Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11staging: dgrp: Drop unnecessary typecastGuenter Roeck1-1/+1
An unnecessary typecast in dgrp_net_ops.c causes the following build error if compiled with W=1. In function ‘copy_from_user’, inlined from ‘dgrp_net_ioctl’ at drivers/staging/dgrp/dgrp_net_ops.c:3408:21: arch/x86/include/asm/uaccess_32.h:211:26: error: call to ‘copy_from_user_overflow’ declared with attribute error: copy_from_user() buffer size is not provably correct Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-26Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfsLinus Torvalds1-2/+2
Pull vfs pile (part one) from Al Viro: "Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent locking violations, etc. The most visible changes here are death of FS_REVAL_DOT (replaced with "has ->d_weak_revalidate()") and a new helper getting from struct file to inode. Some bits of preparation to xattr method interface changes. Misc patches by various people sent this cycle *and* ocfs2 fixes from several cycles ago that should've been upstream right then. PS: the next vfs pile will be xattr stuff." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits) saner proc_get_inode() calling conventions proc: avoid extra pde_put() in proc_fill_super() fs: change return values from -EACCES to -EPERM fs/exec.c: make bprm_mm_init() static ocfs2/dlm: use GFP_ATOMIC inside a spin_lock ocfs2: fix possible use-after-free with AIO ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero target: writev() on single-element vector is pointless export kernel_write(), convert open-coded instances fs: encode_fh: return FILEID_INVALID if invalid fid_type kill f_vfsmnt vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op nfsd: handle vfs_getattr errors in acl protocol switch vfs_getattr() to struct path default SET_PERSONALITY() in linux/elf.h ceph: prepopulate inodes only when request is aborted d_hash_and_lookup(): export, switch open-coded instances 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() 9p: split dropping the acls from v9fs_set_create_acl() ...
2013-02-22new helper: file_inode(file)Al Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-02-21Merge tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/ttyLinus Torvalds3-7/+9
Pull tty/serial patches from Greg Kroah-Hartman: "Here's the big tty/serial driver patches for 3.9-rc1. More tty port rework and fixes from Jiri here, as well as lots of individual serial driver updates and fixes. All of these have been in the linux-next tree for a while." * tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (140 commits) tty: mxser: improve error handling in mxser_probe() and mxser_module_init() serial: imx: fix uninitialized variable warning serial: tegra: assume CONFIG_OF TTY: do not update atime/mtime on read/write lguest: select CONFIG_TTY to build properly. ARM defconfigs: add missing inclusions of linux/platform_device.h fb/exynos: include platform_device.h ARM: sa1100/assabet: include platform_device.h directly serial: imx: Fix recursive locking bug pps: Fix build breakage from decoupling pps from tty tty: Remove ancient hardpps() pps: Additional cleanups in uart_handle_dcd_change pps: Move timestamp read into PPS code proper pps: Don't crash the machine when exiting will do pps: Fix a use-after free bug when unregistering a source. pps: Use pps_lookup_dev to reduce ldisc coupling pps: Add pps_lookup_dev() function tty: serial: uartlite: Support uartlite on big and little endian systems tty: serial: uartlite: Fix sparse and checkpatch warnings serial/arc-uart: Miscll DT related updates (Grant's review comments) ... Fix up trivial conflicts, mostly just due to the TTY config option clashing with the EXPERIMENTAL removal.
2013-02-13pps: Move timestamp read into PPS code properGeorge Spelvin2-0/+2
The PPS (Pulse-Per-Second) line discipline has developed a number of unhealthy attachments to core tty data and functions, ultimately leading to its breakage. The previous patches fixed the crashing. This one reduces coupling further by eliminating the timestamp parameter from the dcd_change ldisc method. This reduces header file linkage and makes the extension more generic, and the timestamp read is delayed only slightly, from just before the ldisc->ops->dcd_change method call to just after. Fix attendant build breakage in drivers/tty/n_tty.c drivers/tty/tty_buffer.c drivers/staging/speakup/selection.c drivers/staging/dgrp/dgrp_*.c Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Chris Brannon <chris@the-brannons.com> Cc: Kirk Reiser <kirk@braille.uwo.ca> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: George Spelvin <linux@horizon.com> Acked-by: Rodolfo Giometti <giometti@enneenne.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-13staging: dgrp: remove redundant NULL check before unregister_dgrp_device().Cyril Roelandt1-6/+3
unregister_dgrp_device on a NULL pointer is a no-op, so the NULL checks in dgrp_remove_nd() can be removed. Signed-off-by: Cyril Roelandt <tipecaml@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-08staging: dgrp: prefix function names with dgrp_ in dgrp_specproc.cTommi Rantala1-32/+34
Prefix the functions in dgrp_specproc.c to avoid ambiguity in backtraces, such as the "info_proc_open" in this one: unreferenced object 0xffff88003b6696e0 (size 32): comm "cat", pid 2321, jiffies 4294705179 (age 29.434s) hex dump (first 32 bytes): 40 79 1c 81 ff ff ff ff 60 79 1c 81 ff ff ff ff @y......`y...... 50 79 1c 81 ff ff ff ff b0 62 89 81 ff ff ff ff Py.......b...... backtrace: [<ffffffff81c7e3b1>] kmemleak_alloc+0x21/0x50 [<ffffffff811955cb>] kmem_cache_alloc_trace+0x11b/0x190 [<ffffffff811c87dc>] single_open+0x3c/0xc0 [<ffffffff81896495>] info_proc_open+0x15/0x20 [<ffffffff8120c6d7>] proc_reg_open+0xb7/0x160 [<ffffffff811a1a5c>] do_dentry_open+0x1cc/0x280 [<ffffffff811a296a>] finish_open+0x4a/0x60 [<ffffffff811b14d7>] do_last+0xb07/0xdb0 [<ffffffff811b1842>] path_openat+0xc2/0x4f0 [<ffffffff811b1cac>] do_filp_open+0x3c/0xa0 [<ffffffff811a2dcc>] do_sys_open+0x11c/0x1c0 [<ffffffff811a2e8c>] sys_open+0x1c/0x20 [<ffffffff81ca3d69>] system_call_fastpath+0x16/0x1b [<ffffffffffffffff>] 0xffffffffffffffff Signed-off-by: Tommi Rantala <tt.rantala@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-08staging: dgrp: use correct release op for /proc/dgrp/infoTommi Rantala1-1/+1
Trinity (the syscall fuzzer) discovered that reading /proc/dgrp/info was leaking some memory. Fix by using the correct release op in info_proc_file_ops. unreferenced object 0xffff88003b6696e0 (size 32): comm "cat", pid 2321, jiffies 4294705179 (age 29.434s) hex dump (first 32 bytes): 40 79 1c 81 ff ff ff ff 60 79 1c 81 ff ff ff ff @y......`y...... 50 79 1c 81 ff ff ff ff b0 62 89 81 ff ff ff ff Py.......b...... backtrace: [<ffffffff81c7e3b1>] kmemleak_alloc+0x21/0x50 [<ffffffff811955cb>] kmem_cache_alloc_trace+0x11b/0x190 [<ffffffff811c87dc>] single_open+0x3c/0xc0 [<ffffffff81896495>] info_proc_open+0x15/0x20 [<ffffffff8120c6d7>] proc_reg_open+0xb7/0x160 [<ffffffff811a1a5c>] do_dentry_open+0x1cc/0x280 [<ffffffff811a296a>] finish_open+0x4a/0x60 [<ffffffff811b14d7>] do_last+0xb07/0xdb0 [<ffffffff811b1842>] path_openat+0xc2/0x4f0 [<ffffffff811b1cac>] do_filp_open+0x3c/0xa0 [<ffffffff811a2dcc>] do_sys_open+0x11c/0x1c0 [<ffffffff811a2e8c>] sys_open+0x1c/0x20 [<ffffffff81ca3d69>] system_call_fastpath+0x16/0x1b [<ffffffffffffffff>] 0xffffffffffffffff Signed-off-by: Tommi Rantala <tt.rantala@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22staging: dgrp: check for a valid proc dir entry pointerDevendra Naga1-1/+3
while proc_create fails, the register_proc_table can do a derefernce of the null pointer causing to oops the system, instead check for a valid pointer at register and unregister Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18tty: Added a CONFIG_TTY option to allow removal of TTYJoe Millenbach1-1/+1
The option allows you to remove TTY and compile without errors. This saves space on systems that won't support TTY interfaces anyway. bloat-o-meter output is below. The bulk of this patch consists of Kconfig changes adding "depends on TTY" to various serial devices and similar drivers that require the TTY layer. Ideally, these dependencies would occur on a common intermediate symbol such as SERIO, but most drivers "select SERIO" rather than "depends on SERIO", and "select" does not respect dependencies. bloat-o-meter output comparing our previous minimal to new minimal by removing TTY. The list is filtered to not show removed entries with awk '$3 != "-"' as the list was very long. add/remove: 0/226 grow/shrink: 2/14 up/down: 6/-35356 (-35350) function old new delta chr_dev_init 166 170 +4 allow_signal 80 82 +2 static.__warned 143 142 -1 disallow_signal 63 62 -1 __set_special_pids 95 94 -1 unregister_console 126 121 -5 start_kernel 546 541 -5 register_console 593 588 -5 copy_from_user 45 40 -5 sys_setsid 128 120 -8 sys_vhangup 32 19 -13 do_exit 1543 1526 -17 bitmap_zero 60 40 -20 arch_local_irq_save 137 117 -20 release_task 674 652 -22 static.spin_unlock_irqrestore 308 260 -48 Signed-off-by: Joe Millenbach <jmillenbach@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15TTY: switch tty_flip_buffer_pushJiri Slaby1-2/+2
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. Now, the one where most of tty_port_tty_get gets removed: tty_flip_buffer_push. IOW we also closed all the races in drivers not using tty_port_tty_get at all yet. Also we move tty_flip_buffer_push declaration from include/linux/tty.h to include/linux/tty_flip.h to all others while we are changing it anyway. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15TTY: switch tty_insert_flip_charJiri Slaby1-1/+1
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. tty_insert_flip_char is the next one to proceed. This one is used all over the code, so the patch is huge. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15TTY: convert more flipping functionsJiri Slaby1-1/+1
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty pointer in many call sites. Only tty_port will be needed and hence no more tty_port_tty_get calls in those paths. Now 4 string flipping ones are on turn: * tty_insert_flip_string_flags * tty_insert_flip_string_fixed_flag * tty_prepare_flip_string * tty_prepare_flip_string_flags Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15TTY: switch tty_buffer_request_room to tty_portJiri Slaby1-2/+2
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty pointer in many call sites. Only tty_port will be needed and hence no more tty_port_tty_get calls in those paths. Here we start with tty_buffer_request_room. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-11Merge tag 'tty-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/ttyLinus Torvalds6-99/+25
Pull TTY/Serial merge from Greg Kroah-Hartman: "Here's the big tty/serial tree set of changes for 3.8-rc1. Contained in here is a bunch more reworks of the tty port layer from Jiri and bugfixes from Alan, along with a number of other tty and serial driver updates by the various driver authors. Also, Jiri has been coerced^Wconvinced to be the co-maintainer of the TTY layer, which is much appreciated by me. All of these have been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fixed up some trivial conflicts in the staging tree, due to the fwserial driver having come in both ways (but fixed up a bit in the serial tree), and the ioctl handling in the dgrp driver having been done slightly differently (staging tree got that one right, and removed both TIOCGSOFTCAR and TIOCSSOFTCAR). * tag 'tty-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (146 commits) staging: sb105x: fix potential NULL pointer dereference in mp_chars_in_buffer() staging/fwserial: Remove superfluous free staging/fwserial: Use WARN_ONCE when port table is corrupted staging/fwserial: Destruct embedded tty_port on teardown staging/fwserial: Fix build breakage when !CONFIG_BUG staging: fwserial: Add TTY-over-Firewire serial driver drivers/tty/serial/serial_core.c: clean up HIGH_BITS_OFFSET usage staging: dgrp: dgrp_tty.c: Audit the return values of get/put_user() staging: dgrp: dgrp_tty.c: Remove the TIOCSSOFTCAR ioctl handler from dgrp driver serial: ifx6x60: Add modem power off function in the platform reboot process serial: mxs-auart: unmap the scatter list before we copy the data serial: mxs-auart: disable the Receive Timeout Interrupt when DMA is enabled serial: max310x: Setup missing "can_sleep" field for GPIO tty/serial: fix ifx6x60.c declaration warning serial: samsung: add devicetree properties for non-Exynos SoCs serial: samsung: fix potential soft lockup during uart write tty: vt: Remove redundant null check before kfree. tty/8250 Add check for pci_ioremap_bar failure tty/8250 Add support for Commtech's Fastcom Async-335 and Fastcom Async-PCIe cards tty/8250 Add XR17D15x devices to the exar_handle_irq override ...
2012-11-26staging: dgrp: dgrp_tty.c: Audit the return values of get/put_user()Kumar Amit Mehta1-14/+8
fix for missing audits for return values of get_user() and put_user(). Inspecting the return values of get/put_user() would make the access_ok() redundant, hence removing calls to access_ok() in such scenarios. Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: dgrp: dgrp_tty.c: Remove the TIOCSSOFTCAR ioctl handler from dgrp driverKumar Amit Mehta1-7/+0
Remove the TIOCSSOFTCAR ioctl handler from dgrp driver and let the core tty layer to take care of this ioctl instead. Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: dgrp: Fix typo in dgrp driverMasanari Iida2-6/+6
Correct spelling typo in staging/dgrp driver Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-15TTY: call tty_port_destroy in the rest of driversJiri Slaby2-1/+5
After commit "TTY: move tty buffers to tty_port", the tty buffers are not freed in some drivers. This is because tty_port_destructor is not called whenever a tty_port is freed. This was an assumption I counted with but was unfortunately untrue. So fix the drivers to fulfil this assumption. To be sure, the TTY buffers (and later some stuff) are gone along with the tty_port, we have to call tty_port_destroy at tear-down places. This is mostly where the structure containing a tty_port is freed. This patch does exactly that -- put tty_port_destroy at those places. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-14staging: dgrp: remove TIOCGSOFTCAR and TIOCSSOFTCAR handlingBill Pemberton1-15/+0
The TIOCGSOFTCAR and TIOCSSOFTCAR ioctls are handled by the tty layer so the dgrp driver shouldn't try to deal with them itself. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-29staging: dgrp: fix potential NULL defereference issueYuanhan Liu1-1/+1
Fix a coccinelle warning catched by Fengguang's 0-DAY system: + drivers/staging/dgrp/dgrp_net_ops.c:1061:11-27: ERROR: nd is NULL but dereferenced. Put the "done:" label a bit down would solve this issue. Cc: Fengguang Wu <fengguang.wu@intel.com> Cc: Julia Lawall <julia.lawall@lip6.fr> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-29Merge 3.7-rc3 into staging-nextGreg Kroah-Hartman3-0/+18
This resolves the conflict with: drivers/staging/comedi/drivers/amplc_dio200.c and syncs up the changes that happened in the staging directory for 3.7-rc3. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-25staging: dgrp: remove rawreadok module optionBill Pemberton4-25/+0
The functionality behind this option has been removed in the driver so remove the config option to set/unset it. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-25staging: dgrp: remove use of real_raw and read_cnt in dgrp_inputBill Pemberton1-59/+8
dgrp_input used real_raw and read_cnt from struct tty_struct. Those members have gone away. Rework the code to not use them. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22staging: remove version.h include from dgrp/dgrp_sysfs.cJesper Juhl1-1/+0
The file uses nothing from linux/version.h, so the include is pointless - remove it. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22staging: dgrp: fix some warningsAlan Cox3-2/+5
Just squashing these to get them out of the analysis queue. nd_ps_desc is an array not a pointer so comparing it with NULL is silly (be nice if gcc shouted about this). And there are some slightly pointless comparisons too. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17staging: dgrp: check return value of alloc_tty_driverBill Pemberton1-0/+9
alloc_tty_driver was always assumed to succeed. Add code to check the return value and return -ENOMEM if alloc_tty_driver fails. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17staging: dgrp: check for NULL pointer in (un)register_proc_tableBill Pemberton1-0/+6
register_proc_table and unregister_proc_table didn't deal with the possibility that the *table pointer could be NULL. Check for this and return if table is NULL. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-05staging: serial: dgrp: Add missing #include <linux/uaccess.h>Geert Uytterhoeven3-0/+3
On m68k: drivers/staging/dgrp/dgrp_mon_ops.c: In function ‘dgrp_mon_read’: drivers/staging/dgrp/dgrp_mon_ops.c:304: error: implicit declaration of function ‘copy_to_user’ drivers/staging/dgrp/dgrp_specproc.c: In function ‘config_proc_write’: drivers/staging/dgrp/dgrp_specproc.c:470: error: implicit declaration of function ‘copy_from_user’ drivers/staging/dgrp/dgrp_tty.c: In function ‘drp_wmove’: drivers/staging/dgrp/dgrp_tty.c:1284: error: implicit declaration of function ‘copy_from_user’ drivers/staging/dgrp/dgrp_tty.c: In function ‘get_modem_info’: drivers/staging/dgrp/dgrp_tty.c:2267: error: implicit declaration of function ‘put_user’ drivers/staging/dgrp/dgrp_tty.c: In function ‘set_modem_info’: drivers/staging/dgrp/dgrp_tty.c:2283: error: implicit declaration of function ‘access_ok’ drivers/staging/dgrp/dgrp_tty.c:2283: error: ‘VERIFY_READ’ undeclared (first use in this function) drivers/staging/dgrp/dgrp_tty.c:2283: error: (Each undeclared identifier is reported only once drivers/staging/dgrp/dgrp_tty.c:2283: error: for each function it appears in.) drivers/staging/dgrp/dgrp_tty.c:2287: error: implicit declaration of function ‘get_user’ drivers/staging/dgrp/dgrp_tty.c: In function ‘dgrp_tty_digigetedelay’: drivers/staging/dgrp/dgrp_tty.c:2474: error: implicit declaration of function ‘copy_to_user’ drivers/staging/dgrp/dgrp_tty.c: In function ‘dgrp_tty_ioctl’: drivers/staging/dgrp/dgrp_tty.c:2618: error: ‘VERIFY_WRITE’ undeclared (first use in this function) Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>