- Jun 17, 2011
-
-
Pavel Shved authored
if_open() calls try_module_get(), and after an attempt to lock a mutex the if_open() function may return -ERESTARTSYS without putting the module. Then, when if_open() is executed again, try_module_get() is called making the reference counter of THIS_MODULE greater than one at successful exit from if_open(). The if_close() function puts the module only once, and as a result it can't be unloaded. This patch adds module_put call before the return from if_open(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by:
Pavel Shved <shved@ispras.ru> Signed-off-by:
David S. Miller <davem@conan.davemloft.net>
-
- Jun 11, 2011
-
-
Jesper Juhl authored
We leak the memory allocated to 'phi' when the variable goes out of scope in hfcsusb_ph_info(). Signed-off-by:
Jesper Juhl <jj@chaosbits.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jun 03, 2011
-
-
Linus Torvalds authored
This reverts commit b1c43f82. It was broken in so many ways, and results in random odd pty issues. It re-introduced the buggy schedule_work() in flush_to_ldisc() that can cause endless work-loops (see commit a5660b41: "tty: fix endless work loop when the buffer fills up"). It also used an "unsigned int" return value fo the ->receive_buf() function, but then made multiple functions return a negative error code, and didn't actually check for the error in the caller. And it didn't actually work at all. BenH bisected down odd tty behavior to it: "It looks like the patch is causing some major malfunctions of the X server for me, possibly related to PTYs. For example, cat'ing a large file in a gnome terminal hangs the kernel for -minutes- in a loop of what looks like flush_to_ldisc/workqueue code, (some ftrace data in the quoted bits further down). ... Some more data: It -looks- like what happens is that the flush_to_ldisc work queue entry constantly re-queues itself (because the PTY is full ?) and the workqueue thread will basically loop forver calling it without ever scheduling, thus starving the consumer process that could have emptied the PTY." which is pretty much exactly the problem we fixed in a5660b41. Milton Miller pointed out the 'unsigned int' issue. Reported-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Reported-by:
Milton Miller <miltonm@bga.com> Cc: Stefan Bigler <stefan.bigler@keymile.com> Cc: Toby Gray <toby.gray@realvnc.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- May 26, 2011
-
-
Michal Marek authored
The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Cc: Armin Schindler <mac@melware.de> Cc: netdev@vger.kernel.org Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- May 25, 2011
-
-
Prarit Bhargava authored
[2nd try ... 1st attempt didn't make it to netdev mailing list] A quick google search reveals that people with this card are blacklisting it in the initramfs and in the module blacklist based on a statement that it is unsupported. Since the older Digium is also unsupported I'm pretty confident that this newer card is also not supported. lspci -xxx -vv shows 04:07.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface Subsystem: Device b100:0003 P. ----8<---- The Asterisk Voice Card, DIGIUM TDM400P is unsupported by the netjet driver. Blacklist it like the Digium X100P/X101P card. Signed-off-by:
Prarit Bhargava <prarit@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- May 19, 2011
-
-
David S. Miller authored
I was investigating some warnings that spew because of the _DEBUG_FOO ifdef'ery in here. Instead of adding more ifdefs to fix that warning, let's use pr_debug() and get rid of these CPP checks altogether. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- May 13, 2011
-
-
Julia Lawall authored
The file st5481_init.c locally defines and initializes the adapter_list variable, but does not use it for anything. Removing the list makes it possible to remove the list field from the st5481_adapter data structure. In the function probe_st5481, it also makes it possible to free the locally allocated adapter value on an error exit. Signed-off-by:
Julia Lawall <julia@diku.dk> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- May 05, 2011
-
-
Joe Perches authored
Saves about 50KB of data. Old/new size of all objects: text data bss dec hex filename 563015 80096 130684 773795 bcea3 (TOTALS) 610916 32256 130632 773804 bceac (TOTALS) Signed-off-by:
Joe Perches <joe@perches.com> Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be> (for drivers/net/can/softing/softing_cs.c) Signed-off-by:
Dominik Brodowski <linux@dominikbrodowski.net>
-
- Apr 22, 2011
-
-
Felipe Balbi authored
it makes it simpler to keep track of the amount of bytes received and simplifies how flush_to_ldisc counts the remaining bytes. It also fixes a bug of lost bytes on n_tty when flushing too many bytes via the USB serial gadget driver. Tested-by:
Stefan Bigler <stefan.bigler@keymile.com> Tested-by:
Toby Gray <toby.gray@realvnc.com> Signed-off-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Apr 17, 2011
-
-
David S. Miller authored
The variable 'fcr' is set but not used in isdn_tty_change_speed(). Just kill it off. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'len' is set but unused in data_sock_getsockopt(). The code should use 'len' to validate that the user's socket option is indeed the right size. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'unused' is set but unused in isdn_net_ciscohdlck_slarp_in(). Just kill it off. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'ch' is set but unused in isdn_capi_rec_hl_msg(). Just kill it off. Similarly for 'chidx' in isdn_ioctl() and 'di' in isdn_capi_rec_hl_msg(). Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'dev' is set but unused in teles_cs_config(). Just kill it off. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'cause' is set but unused in ni1up(). Just kill it off. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'cause' is set but unused in dss1up(). Just kill it off. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'i' is set but unused in JadeVersion(). Just kill it off. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'cda2_cr' is set but unused in ctrl_complete(). Just kill it off. Keep the cs->readisac() call just in case the register read has side effects. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'buf' is set but unused in ctrl_complete(). Just kill it off. Similarly for 'err' in hfc_usb_init(). Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'bits' is set but unused in change_speed(). Just kill it off. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'dev' is set but unused in elsa_cs_config(). Just kill it off. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'val' is set but unused in send_arcofi(). Just kill it off. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'buf' is set but unused in ctrl_complete(). Just kill it off. Similarly for the variable 'err' in setup_hfcsusb(). Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'total' is set but unused in hfcpci_empty_bfifo(). Just kill it off. Similarly for the variable 'val' in ph_state_nt(). Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'best_id' is set but unused in diva_mnt_add_xdi_adapter(). Just kill it off. Similarly for the variable 'CIP' in connect_req(), 'Number' in sig_ind(), 'Info' in dtmf_confirmation() mixer_command() fax_connect_ack_command() fax_edata_ack_command() rtp_connect_b3_res_command() and rtp_connect_b3_res_command(), and 'a' in mixer_indication_coefs_set(), Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable 'offset' is set but unused in write_iso_tasklet(). Just kill it off. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 06, 2011
-
-
Jan Kiszka authored
udev fully replaces this special file system that only contains CAPI NCCI TTY device nodes. User space (pppdcapiplugin) works without noticing the difference. Signed-off-by:
Jan Kiszka <jan.kiszka@web.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 03, 2011
-
-
Jan Engelhardt authored
Signed-off-by:
Jan Engelhardt <jengelh@medozas.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 31, 2011
-
-
Lucas De Marchi authored
Fixes generated by 'codespell' and manually reviewed. Signed-off-by:
Lucas De Marchi <lucas.demarchi@profusion.mobi>
-
- Mar 30, 2011
-
-
Alexey Dobriyan authored
Signed-off-by:
Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 17, 2011
-
-
matt mooney authored
Replace EXTRA_CFLAGS with ccflags-y. Signed-off-by:
matt mooney <mfm@muteddisk.com> Acked-by:
WANG Cong <xiyou.wangcong@gmail.com> Acked-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Feb 28, 2011
-
-
Justin Mattock authored
The below patch changes a typo "pice" to "piece" Signed-off-by:
Justin P. Mattock <justinmattock@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 17, 2011
-
-
Alan Cox authored
Only oddities here are a couple of drivers that bogusly called the ldisc helpers instead of returning -ENOIOCTLCMD. Fix the bug and the rest goes away. Signed-off-by:
Alan Cox <alan@linux.intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Alan Cox authored
Doing tiocmget was such fun we should do tiocmset as well for the same reasons Signed-off-by:
Alan Cox <alan@linux.intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Alan Cox authored
We don't actually need this and it causes problems for internal use of this functionality. Currently there is a single use of the FILE * pointer. That is the serial core which uses it to check tty_hung_up_p. However if that is true then IO_ERROR is also already set so the check may be removed. Signed-off-by:
Alan Cox <alan@linux.intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Feb 15, 2011
-
-
David S. Miller authored
There was a bug in my commit c978e7bb ("hisax: Fix unchecked alloc_skb() return.") One of the l2->flag checks is wrong. Even worse it turns out I'm duplicating an existing function, so use that instead. Reported-by:
Milton Miller <miltonm@bga.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Paul Bolle authored
Signed-off-by:
Paul Bolle <pebolle@tiscali.nl> Reviewed-by:
Jesper Juhl <jj@chaosbits.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Feb 13, 2011
-
-
David S. Miller authored
Jesper Juhl noticed that l2_pull_iqueue() does not check to see if alloc_skb() fails. Fix this by first trying to reallocate the headroom if necessary, rather than later after we've made hard to undo state changes. Reported-by:
Jesper Juhl <jj@chaosbits.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 09, 2011
-
-
David S. Miller authored
Some cases try to modify const strings, and in any event the CVS revision strings have not changed in over ten years making these printouts completely worthless. Just kill all of this stuff off. Reported-by:
Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 01, 2011
-
-
Stefan Weil authored
This warning was reported by cppcheck: drivers/isdn/icn/icn.c:1641: error: Dangerous usage of 'rev' (strncpy doesn't always 0-terminate it) If strncpy copied 20 bytes, the destination string rev was not terminated. The patch adds one more byte to rev and makes sure that this byte is always 0. Cc: Karsten Keil <isdn@linux-pingi.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Tejun Heo <tj@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-