summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-09-21Staging: line6: workaround for null pointer bugMarkus Grabner
Signed-off-by: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21staging: spectra: off by oneVasiliy Kulikov
g_pBlockTable has only DeviceInfo.wDataBlockNum elements. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21staging: keucr: check kmalloc() return valueVasiliy Kulikov
kmalloc() may fail, if so return error code. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21staging: ti-st: mv headers to ti_wilink_stPavan Savoy
move all the header information to ti_wilink_st.h. This header would then not only serve the local modules like the st_core.c, st_kim.c and st_ll.c but also the external modules/protocol drivers that are dependent on the shared transport driver. Modify the source files to include the new header ti_wilink_st.h, Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21staging: ti-st: set right the data typesPavan Savoy
replace uint and family by a much more proper u8/u16 types. This is required specifically for data members of structures coming in from the chip and data members parsed from the binary firmware file. Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21staging: ath6kl: Fixing a race condition during initializationVipin Mehta
The commit fixes a race condition in the initialization portion of the driver. The problem was observed while testing with the kernel in the staging-next tree. The wait on the ready event is signalled prematurely before setting the arVersion.wlan_ver and arVersion.abi_ver. The code waiting on this semaphore checks for the validity of these values and hence may proceed with an un-updated values of these fields. The wakeup signal is now sent after these values are set. Signed-off-by: Vipin Mehta <vmehta@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21staging: ath6kl: Fixing a compile errorVipin Mehta
The commit fixes a compilation error that was encountered while using a specific kernel configuration file. The problem was the use of some functions defined in <linux/semaphore.h> without including the header file explicitly. It was probably working before because of the dependency getting implicitly satisfied via some other header file. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Vipin Mehta <vmehta@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21staging: ath6kl: Removing duplicate includesVipin Mehta
Eliminating the inclusion of the same header file more than once. The files being removed are already included by osapi_linux.h. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Vipin Mehta <vmehta@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21Staging: comedi: fix printk() coding style issue in adl_pci9111.cMaurice Dawson
This is a patch to the adl_pci9111.c file that fixes all, printk() should include KERN-facility level, warnings found by the checkpatch.pl tool Signed-off-by: Maurice Dawson <mauricedawson2699@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21Staging: vt6655: remove unused update_BssList definitionCharles Clément
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: Introduce update_primary_addr to update mac addressMarek Lindner
set_primary_if is currently misused to update the mac address in vis packets. This unneeded and introduces overhead due to other operations which must be done when updating the primary interface. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: Track references of batman_if in set_primary_ifSven Eckelmann
set_primary_if exchanges the current primary interfaces with a new one. This is a new reference and thus we have to count it and decrease the count of the old primary interface. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: count batman_if list queries as referenceSven Eckelmann
The return of get_batman_if_by_netdev and get_active_batman_if leaks a pointer from the rcu protected list of interfaces. We must protect it to prevent a too early release of the memory. Those functions must increase the reference counter before rcu_read_unlock or it may be to late to prevent a free. hardif_add_interface must also increase the reference count for the returned batman_if to make the behaviour consistent. Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: Use refcnt to track usage count of batman_ifSven Eckelmann
get_batman_if_by_netdev and get_active_batman_if may leak data from the rcu protected list of interfaces. The rcu protected list of all gateway nodes leaks the actual data outside the read-side critical area. This is not valid as we may free the data using a call_rcu created callback after we unlock using rcu_read_unlock. A workaround is to provide a reference count to be sure that the memory isn't freed to early. It is currently only to implement the already existing functionality and doesn't provide the full tracking of all usage cases. Additionally, we must hardif_hold inside the rcu_read_lock()..rcu_read_unlock() before we attach to the structure which "leaks" it. When another function now removed it from its usage context (primary_if, usage on stack, ...) then we must hardif_put it. If it is decremented to zero then we can issue the call_rcu to the freeing function. So "put" is not allowed inside an rcu_read_lock. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: Use synchronize_rcu instead of call_rcuSven Eckelmann
It is recommended [1] to use synchronize_rcu to simplify the code - especially when otherwise extra locking is needed to protect other code from picking stale elements. It also protects us for emitting to many callbacks which may results in OOM conditions. The only reason not to use it, would be in performance critical sections or when we are not allowed to block. [1] Documentation/RCU/checklist.txt Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: Remove unneeded rcu_read_lockSven Eckelmann
Regions which do not use rcu functions don't need to protected by rcu_read_lock. If we want to protect data from being freed than it must be covered by the same read-side critical section or otherwise the grace period may already ended and freed the memory before we called rcu_read_lock again. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: Always protect list_for_each_entry_rcu with RCUSven Eckelmann
receive_bat_packet is not called with rcu_read_lock so we must ensure by ourself that we protect list_for_each_entry_rcu using the correct RCU locks. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: Introduce if_list_lock to protect if_listSven Eckelmann
The update critical sections of if_list must be protected by a locking primitive other than RCU. The iterator must also be protected by the chosen locking mechanism. The rtnl_lock in hardif_remove_interfaces must also be moved outside the iterator primitive to ensure that we don't deadlock the kernel due to differently nested locks in hardif_remove_interfaces and hard_if_event. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: wait for call_rcu before unloading moduleSven Eckelmann
synchronize_rcu respective synchronize_net only waits for the rcu grace period to elapse and we may fail to finish the calls which were made to call_rcu in that time. In result the module could be unloaded during the execution of the RCU callbacks. rcu_barrier[1] will now wait for all outstanding RCU callbacks to finish before continuing. [1] Documentation/RCU/rcubarrier.txt Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: Mark debugfs files as nonseekableSven Eckelmann
We don't allow to seek in the debugfs socket and log files. Thus we should mark the file descriptor as nonseekable. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: Move mailing list address to .orgSven Eckelmann
The official mailing list is run on lists.open-mesh.org and it should be avoided to sent them to lists.open-mesh.net to reduce the number of receipents and double posts. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: checkpatch cleanup of commentsSven Eckelmann
checkpatch now detects the start of a comment and warns about usage of multiple spaces at the beginning of a line. We have to replace the ' ' in multiple lines comments by ' * ' to fix it. Checkpatch also wants a comment after a definition of a spinlock_t which describes what it protects. It is currently not possible to add it before the actual struct which includes the spinlock. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20staging: hv: Remove camel cases of vmbus packet buffer structuresHaiyang Zhang
Remove camel cases of vmbus packet buffer structures Remove camel cases of: struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20staging: octeon: '&pointer[0]' to 'pointer' fixAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20staging: rt2870: '&pointer[0]' to 'pointer' fixAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20staging: vt6655: '&pointer[0]' to 'pointer' fixAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20staging: ath6kl: '&pointer[0]' to 'pointer' fixAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20staging: cxt1e1: '&pointer[0]' to 'pointer' fixAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20staging: otus: '&pointer[0]' to 'pointer' fixAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20staging: rtl8712: '&pointer[0]' to 'pointer' fixAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20staging: wlags49_h2: '&pointer[0]' to 'pointer' fixAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20staging: rt2860: '&pointer[0]' to 'pointer' fixAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: Use static const char * const where possibleJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16Staging: vt665x: remove unused DEF definitionCharles Clément
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: ti-st: fix kim platform device idPavan Savoy
Platform devices tend to have id as -1 when only 1 device exist and a value >=0 when multiple devices exist, since we plan to store all these platform devices if multiple exist, there was a requirement to have id to be >=0. The patch fixes this problem. Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: brcm80211: use string native libraryAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: brcm80211: use native ctype libraryAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: usbip: resolved a space in a commentAgustin March
Removed a space in a comments lines at #459 Signed-off-by: Agustin March <agustin.march@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: msm: Remove pr_<level> uses of KERN_<level>Joe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: keucr: fix keucr lost disconnectAl Cho
keucr lost the disconnect, so keucr crash when plug-in and then plug-out SD-card quickly. unmark the part of usb disconnect Signed-off-by: Al Cho <acho@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: vt6656: Fixed indentation with spacesClelia V. Korol
Fixed the last 5 lines, indented with spaces, replacing spaces with tabs. Signed-off-by: Clelia V. Korol <cvkorol@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: vt6656: removed dummy errors like extra spacesEma Cuevas
As reported by checkpatch. Signed-off-by: Ema Cuevas <emacupk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: vt6656: delete some parenthesismatias
I remove parenthesis for a return variable, and also delete a space and tab the code line Signed-off-by: matias <munozmatiasn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: vt6656: Space Added after definition of Variable MSG_LEVEL_INFOEmanuel Mariano Ravera
Added an space after the definition of the variable MSG_LEVEL_INFO on line 43 Signed-off-by: Emanuel Mariano Ravera <ravera.emanuel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: vt6656: removed not required parentheses.Diego H. Iglesias
Removed not required parentheses in return statements. Signed-off-by: Diego H. Iglesias <diegohi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: comedi: fix signess bugVasiliy Kulikov
ai_count and ao_counter are unsigned, check for < 0 doesn't make sense. Cast them to int. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: crystalhd: fix signed bugVasiliy Kulikov
chd_dec_major is unsigned, so check chd_dec_major < 0 doesn't make sense. Since it is used as signed, declare it as int. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: solo6010: fix signess bugVasiliy Kulikov
video_nr is unsigned, so check video_nr >= 0 doesn't make sense. The only "negative" value may be -1, so explicitly check for it. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: ST_BT depends on RFKILLRandy Dunlap
Fix kconfig unmet dependency warning: warning: (ST_BT && STAGING && !STAGING_EXCLUDE_BUILD && BT) selects TI_ST which has unmet direct dependencies (RFKILL) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging/bcm: fix build for CONFIG_PM not enabledRandy Dunlap
Handle build case of CONFIG_PM not being enabled. drivers/staging/bcm/InterfaceInit.c:280: error: 'struct usb_device' has no member named 'autosuspend_delay' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>