Commit Graph

426052 Commits

Author SHA1 Message Date
Joe Perches 510fa40852 staging: slicoss: Add MAINTAINERS entry, break README into TODO & README
Adding a MAINTAINERS entry with content from the README.
Move the TODO items from the README to a separate TODO file.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:37:27 -08:00
Kirill Tkhai 161737a619 staging: slicoss: Fix possible reuse of freed memory in timer function
Do not call kfree() till timer function is finished.

[This was found using grep. Compiled tested only]

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
CC: Joe Perches <joe@perches.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:37:27 -08:00
navin patidar aa6d5e4cde staging: rtl8188eu: remove header file ip.h
"ip.h" is included in four files but not being used, so
remove "include/ip.h" header file and inclusion of this header file.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:33:15 -08:00
navin patidar 0bb9a2ed7e staging: rtl8188eu: remove header file if_ether.h
"if_ether.h" is included in three files but not being used, so
remove "include/if_ether.h" header file and inclusion of this header file.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:31:03 -08:00
Daeseok Youn 393f539c66 staging : android : sync : fix a checkpatch warning
- WARNING: missing space after return type

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:27:30 -08:00
Daeseok Youn 0204c58e27 staging: android: timed_output: fix a checkpatch warning
- WARNING: Multiple spaces after return type

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:27:30 -08:00
Daeseok Youn 5110898527 staging : ion : Fix some checkpatch warnings and an error
Warning:
 - Unnecessary space after function pointer name
 - quoted string split across lines
 - fix alignment issues

Error:
 - return is not a function, parentheses are not required

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:27:30 -08:00
SeongJae Park a894c69be0 staging: android: binder: use whitespace consistently
Whitespace between #define keyword and BINDER_* constants are space in
some point and tab in some point. Using space or tab is just writer's
choice. But, let's use them more consistently.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:22:32 -08:00
Chase Southwood 777e5d3ed5 Staging: comedi: fix memory leak in comedi_bond.c
We allocate bdev and then krealloc the devs pointer in order to add bdev
at the end of the devpriv->devs array list.  But if for some reason this
krealloc fails, we need to free bdev before returning an error otherwise
this memory is leaked.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:22:32 -08:00
Paul Bolle 8542373dcc Staging: rtl8812ae: remove undefined Kconfig macros
There are references to four undefined Kconfig macros in the code.
Remove these as the checks for them will always evaluate to false.

There are additional cleanups possible now, but I'll gladly leave those
to people that are actually familiar with the code.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:22:31 -08:00
Paul Bolle d5d1999934 staging: r8188eu: default to "y" in Kconfig
Two Kconfig entries for this driver default to (uppercase) "Y". But in
Kconfig (lowercase) "y" is a magic symbol. "Y" is an ordinary symbol.
As "Y" is never set these Kconfig symbols will also not be set by
default.

So use "default y" here, as was clearly intended.

Reported-by: Martin Walch <walch.martin@web.de>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:22:31 -08:00
Surendra Patil 8f1e98a329 drivers:staging:rtl8821ae: Fixed few coding style erors and warnings
Fixed multiple coding style errors and warnings
wifi.h:1077: WARNING: please, no space before tabs
wifi.h:762: WARNING: missing space after struct definition
wifi.h:972: WARNING: please, no spaces at the start of a line
wifi.h:1825: WARNING: Unnecessary space after function pointer name
wifi.h:1826: ERROR: "foo * bar" should be "foo *bar"
wifi.h:1099: WARNING: missing space after return type
wifi.h:1320: ERROR: Macros with complex values should be enclosed in parenthesis
wifi.h:1758: WARNING: Multiple spaces after return type
wifi.h:1855: ERROR: code indent should use tabs where possible
wifi.h:2303: ERROR: space prohibited after that open parenthesis '('
wifi.h:2408: ERROR: spaces required around that '=' (ctx:VxV)

Signed-off-by: Surendra Patil <surendra.tux@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:15:05 -08:00
Larry Finger d249db9e5a staging: r8188eu: Fix missing header
Commit 2397c6e092 entitled "staging: r8188eu:
Remove wrappers around vmalloc and vzalloc" and
commit: 03bd6aea7b entitled "staging: r8188eu:
Remove wrappers around vfree" failed to add the header file needed
to provide vzalloc and vfree.

This problem was reported by the kbuild test robot.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:09:59 -08:00
Andreas Dilger 38585ccc46 staging/lustre/llite: fix O_TMPFILE/O_LOV_DELAY_CREATE conflict
In kernel 3.11 O_TMPFILE was introduced, but the open flag value
conflicts with the O_LOV_DELAY_CREATE flag 020000000 previously used
by Lustre-aware applications.  O_LOV_DELAY_CREATE allows applications
to defer file layout and object creation from open time (the default)
until it can instead be specified by the application using an ioctl.

Instead of trying to find a non-conflicting O_LOV_DELAY_CREATE flag
or define a Lustre-specific flag that isn't of use to most/any other
filesystems, use (O_NOCTTY|FASYNC) as the new value.  These flags
are not meaningful for newly-created regular files and should be
OK since O_LOV_DELAY_CREATE is only meaningful for new files.

I looked into using O_ACCMODE/FMODE_WRITE_IOCTL, which allows calling
ioctl() on the minimally-opened fd and is close to what is needed,
but that doesn't allow specifying the actual read or write mode for
the file, and fcntl(F_SETFL) doesn't allow O_RDONLY/O_WRONLY/O_RDWR
to be set after the file is opened.

Lustre-change: http://review.whamcloud.com/8312
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4209
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:09:59 -08:00
John L. Hammond 7345fb75e0 lustre: don't leak llog handle in llog_cat_process_cb()
An early return from llog_cat_process_cb() was leaking the llog
handle. Fix this by not doing that.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/7847
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4054
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:09:58 -08:00
Andrew Perepechko e93a3082fc lustre/xattr: separate ACL and XATTR caches
This patch separates ACL and XATTR caches, so that
when updating an ACL only LOOKUP lock is needed and
when updating another XATTR only XATTR lock is needed.

This patch also reverts XATTR cache support for setxattr
because client performing REINT under even PR lock
will deadlock if an active server operation (like unlink)
attempts to cancel all locks, and setxattr has to wait
for it (MDC max-in-flight is 1).

This patch disables the r/o cache if the data is
unreasonably large (larger than maximum single EA
size).

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: http://review.whamcloud.com/7208
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3669
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:09:58 -08:00
yang sheng 08a78a27e1 lustre: instantiate negative dentry
In the atomic_open callback. We should instantiate
negative dentry. Else will got sanity:183 failed.

Signed-off-by: yang sheng <yang.sheng@intel.com>
Reviewed-on: http://review.whamcloud.com/8110
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3228
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:09:58 -08:00
Swapnil Pimpale 7486bc06ab lustre: Unsafe error handling around ll_splice_alias
Callers of ll_splice_alias() should not assign the returned pointer to
the dentry since it can be an err pointer. Fixed the above bug using a
temporary dentry pointer. This temporary pointer is assigned to dentry
only if ll_splice_alias has not returned an err pointer.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Reviewed-on: http://review.whamcloud.com/7460
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3807
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:09:57 -08:00
Bobi Jam f34b6cd3ee lustre/lov: avoid subobj's coh_parent race
* during a file lov object initialization, we need protect the access
  and change of its subobj->coh_parent, since it could be another
  layout change race there, which makes an unreferenced lovsub obj in
  the site object hash table.

* dump lovsub objects in the site if the lovsub device reference > 0
  during its finalization phase.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Reviewed-on: http://review.whamcloud.com/6105
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1480
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:09:57 -08:00
Greg Kroah-Hartman 7ca363f687 Merge branch 'staging-linus' into staging-work
This is to pull in the lustre fixes so that others can continue to work
on updating the lustre codebase, as well as resolve some merge issues
with the ion and ocproto drivers to keep linux-next happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-08 13:38:28 -08:00
Greg Kroah-Hartman a0f4525202 Second round of IIO fixes for the 3.14 cycle.
Another mixed bag, including some that were not in round 1 because
 they applied to elements that went in during the merge window whereas
 round 1 predated that.  I have been effectively out of action for 3 weeks
 so will take a little while to catch up with my backlog.
 
 * mag3110 - report busy in read_raw / write_raw when buffered capture
   is underway to avoid either changing the characteristics of the capture or
   causing capture issues by reading data destined for the buffer.
 * mag3110 - fix a failure to specify leading zeros when formatting a decimal
   number.
 * lradc - fix a buffer overflow and incorrect reporting of scale for voltage
   channel 15
 * lradc - drop some scale_available attributes for elements that don't actually
   exist.  These could otherwise cause some interesting issues for userspace.
 * ad799x - a typo in the events information mask resulted in some nasty crashes
   on failed probes.
 * ak8975 - fix scale attribute output to avoid incorrect intepretation of
   readings in userspace.
 * adis16400 - make sure the timestamp is the last element in all channel_spec
   arrays as this assumption is made by the buffer filling code, but was not
   true previously.
 * bma180 - correctly use modifiers to distinguish the channels rather than
   indexes.  This brings the abi inline with the standard option for 3 axis
   accelerometers.
 * max1363 - use devm_regulator_get_optional instead of the non optional case
   to allow the device to successfully probe when a regulator is not specified.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJS9ofvAAoJEFSFNJnE9BaIH0wP/007ZKzhsuEzi6eRufxrNcfq
 TJDIJlGTMwNBozIva1dXvazpcbcPzVnpWuvaVZ35ENDd5G1CKwfb6iI0jVAfD211
 RW+EyV2us8HNCATWewVfaHYVbiCZ5e/73rgt+IwKgiClmiw2vWLL+Y5c1ZNpIwm8
 j4xKeB/fIse4UeruJeTbdUuSQHn9rO5LEBx0R+/WpqML2SbUVynGo7oU4oa/q0H0
 OfFbNC/l59vT2WvWHaLvVK9lChg8nHlhN3VK2FITDF/Mb6kyB8nZTpOu2MBT9eIP
 3zrO+jtIJxRmzxKhmZm7rX0h5CfYtIosFUJge8c3mAUxvDuQ/kKPorHAM5Fjxhz5
 TF20fEUmOFBL60tYGI27MptMJbpfJ/jJeNBOYxGi2ytSOMH01j8rxTDGGUhuGnUd
 gOT9M/C5PexMkRHAu+soKTyJ8s9xK1+V2Ng2g6Z6Dp44tSXeMS0UYA4q6XhQ3QQF
 /ACIp/6rRrJAZkkHOu6msarzQ6bNIOK73YxfVNHO41VU12yhljzF7LyxYwohe0Dk
 EircHAp3SqTNgIfl835YZxNpejcQ8f7sXvKa5RMK+UBMhfiA7T+k0WQHmeaDI42H
 EYX2k0i+lDQ1a/MS9IQ5i+cMN00Ia/3UzFADYyuLSrc0kXBwIQUvjtaekrvPI0Ue
 7UQF2yyP/wzqw3GUoP1F
 =MjtB
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-3.14b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

Second round of IIO fixes for the 3.14 cycle.

Another mixed bag, including some that were not in round 1 because
they applied to elements that went in during the merge window whereas
round 1 predated that.  I have been effectively out of action for 3 weeks
so will take a little while to catch up with my backlog.

* mag3110 - report busy in read_raw / write_raw when buffered capture
  is underway to avoid either changing the characteristics of the capture or
  causing capture issues by reading data destined for the buffer.
* mag3110 - fix a failure to specify leading zeros when formatting a decimal
  number.
* lradc - fix a buffer overflow and incorrect reporting of scale for voltage
  channel 15
* lradc - drop some scale_available attributes for elements that don't actually
  exist.  These could otherwise cause some interesting issues for userspace.
* ad799x - a typo in the events information mask resulted in some nasty crashes
  on failed probes.
* ak8975 - fix scale attribute output to avoid incorrect intepretation of
  readings in userspace.
* adis16400 - make sure the timestamp is the last element in all channel_spec
  arrays as this assumption is made by the buffer filling code, but was not
  true previously.
* bma180 - correctly use modifiers to distinguish the channels rather than
  indexes.  This brings the abi inline with the standard option for 3 axis
  accelerometers.
* max1363 - use devm_regulator_get_optional instead of the non optional case
  to allow the device to successfully probe when a regulator is not specified.
2014-02-08 13:29:18 -08:00
Guenter Roeck 55b40d3731 iio: max1363: Use devm_regulator_get_optional for optional regulator
In kernel version 3.13, devm_regulator_get() may return no error
if a regulator is undeclared. regulator_get_voltage() will return
-EINVAL if this happens. This causes the driver to fail loading if
the vref regulator is not declared.

Since vref is optional, call devm_regulator_get_optional instead.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 11:46:00 +00:00
Peter Meerwald 5585215b6d iio:accel:bma180: Use modifier instead of index in channel specification
This driver was not complying with the ABI and the purpose of this patch
is to bring it inline so that userspace will correctly identify the channels.

Should use channel modifiers (X/Y/Z), not channel indices
timestamp channel has scan index 3, not 4

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Kravchenko Oleksandr <x0199363@ti.com>
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 11:31:50 +00:00
Marcus Folkesson c76782d151 iio: adis16400: Set timestamp as the last element in chan_spec
This is necessary since timestamp is calculated as the last element
in iio_compute_scan_bytes().

Without this fix any userspace code reading the layout of the buffer via
sysfs will incorrectly interpret the data leading some nasty corruption.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 11:26:06 +00:00
Beomho Seo bef44abccb iio: ak8975: Fix calculation formula for convert micro tesla to gauss unit
This effects the reported scale of the raw values, and thus userspace
applications that use this value.

One micro tesla equal 0.01 gauss. So I have fixed calculation formula And add RAW_TO_GAUSS macro.
ASA is in the range of 0 to 255. If multiply 0.003, calculation result(in_magn_[*]_scale) is
always 0. So multiply 3000 and return and IIO_VAL_INT_PLUS_MICRO.
As a result, read_raw call back function return accurate scale value.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 10:28:05 +00:00
Hartmut Knaack d180371d41 staging:iio:ad799x fix typo in ad799x_events[]
This patch fixes a typo in ad799x_events[], which caused the error "Failed to register event set".

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 10:12:28 +00:00
Alexandre Belloni 5af473c17a iio: mxs-lradc: remove useless scale_available files
in_voltage8_scale_available and in_voltage9_scale_available are exposed to
userspace but useless as in_voltage8_raw and in_voltage9_raw are not available.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 10:06:33 +00:00
Alexandre Belloni d4bf105bb6 iio: mxs-lradc: fix buffer overflow
Fixes:
drivers/staging/iio/adc/mxs-lradc.c:1556 mxs_lradc_probe() error: buffer
overflow 'iio->channels' 15 <= 15

The reported available scales for in_voltage15 were also wrong.

The realbits lookup is not necessary as all the channels of the LRADC have the
same resolution, use LRADC_RESOLUTION instead.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 10:06:30 +00:00
Peter Meerwald 71bd89454d iio:magnetometer:mag3110: Fix output of decimal digits in show_int_plus_micros()
need to print leading zeros, hence "%d.%06d"

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 10:06:27 +00:00
Peter Meerwald f25330f63e iio:magnetometer:mag3110: Report busy in _read_raw() / write_raw() when buffer is enabled
individual reads are not permitted concurrently with buffered reads

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 10:06:22 +00:00
Maurizio Lombardi 6b89db36b3 wlags49_h2: Fix overflow in wireless_set_essid()
This patch prevents the wireless_set_essid() function from overwriting
the last byte of the NetworkName buffer which must be NULL.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 11:10:08 -08:00
Alan Cox ad3815a595 xlr_net: Fix missing trivial allocation check
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 11:10:08 -08:00
Dan Carpenter e6ff3f4e6d staging: r8188eu: overflow in rtw_p2p_get_go_device_address()
The go_devadd_str[] array is two characters too small to hold the
address so we corrupt memory.

I've changed the user space API slightly and I don't have a way to test
if this breaks anything.  In the original code we truncated away the
last digit of the address and the NUL terminator so it was already a bit
broken.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 11:10:08 -08:00
Dan Carpenter 893134b084 staging: r8188eu: array overflow in rtw_mp_ioctl_hdl()
MAX_MP_IOCTL_SUBCODE (35) and mp_ioctl_hdl (32 elements) are no longer
in sync.  It leads to a bogus pointer dereference.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 11:10:08 -08:00
Larry Finger 08951f10ae staging: r8188eu: Fix typo in USB_DEVICE list
There is a typo in the device list that interchanges the vendor and
product codes for one of the entries. This exchange was determined
by noticing that the vendor code is 0x07b8 for Abocom at
http://www.linux-usb.org/usb.ids.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 11:10:08 -08:00
Heinrich Schuchardt 2a7470d9ff usbip/userspace/libsrc/names.c: memory leak
revised patch

p is freed if NULL.
p is leaked if second calloc fails.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 11:08:46 -08:00
Dan Carpenter 54de9af9f0 gpu: ion: dereferencing an ERR_PTR
We dereference "heap->task" before checking if it's an ERR_PTR.

Fixes: ea313b5f88 ('gpu: ion: Also shrink memory cached in the deferred free list')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 11:08:46 -08:00
Ian Abbott 791771e4e0 staging: comedi: usbduxsigma: fix unaligned dereferences
There are a couple of dereferences such as `*(uint32_t
*)(devpriv->insn_buf + 1)` that are unaligned as `devpriv->insn_buf` is
of type `uint8_t *`.  This works on x86 architecture but may not be
supported on other architectures.  Call `get_unalign()` to perform the
unaligned dereferences.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Bernd Porr <mail@berndporr.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 11:08:46 -08:00
Ian Abbott f1ffdfcc52 staging: comedi: fix too early cleanup in comedi_auto_config()
`comedi_auto_config()` is usually called from the probe routine of a
low-level comedi driver to allocate and auto-configure a comedi device.
Part of this involves calling the low-level driver's `auto_attach()`
handler, and if that is successful, `comedi_device_postconfig()` tries
to complete the configuration of the comedi device.  If either of those
fail, `comedi_device_detach()` is called to clean up, and
`comedi_release_hardware_device()` is called to remove the dynamically
allocated comedi device.

Unfortunately, `comedi_device_detach()` clears the `hw_dev` member of
the `struct comedi_device` (indirectly via `comedi_clear_hw_dev()`), and
that stops `comedi_release_hardware_device()` finding the comedi device
associated with the hardware device, so the comedi device won't be
removed properly.

Since `comedi_release_hardware_device()` also calls
`comedi_device_detach()` (assuming it finds the comedi device associated
with the hardware device), the fix is to remove the direct call to
`comedi_device_detach()` from `comedi_auto_config()` and let the call to
`comedi_release_hardware_device()` take care of it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 11:08:46 -08:00
Dan Carpenter 630127f367 staging: android: ion: dummy: fix an error code
We should be returning -ENOMEM here instead of zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 11:08:46 -08:00
Salym Senyonga e4b41af14d Staging: ozwpan: Change kmalloc() to kzalloc()
changing to kzalloc lets us get rid of some lines. The other concern
here is that some members of binding->ptype are still uninitialized at
the end of the function.

Signed-off-by: Salym Senyonga <salymsash@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:59:38 -08:00
Salym Senyonga a44755d88c Staging: ozwpan: reduce indent levels in oz_binding_add().
When hit error then we can return immediately. This makes the code
simpler and lets us remove some indenting.

Signed-off-by: Salym Senyonga <salymsash@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:59:38 -08:00
Salym Senyonga e9e4433e6b Staging: ozwpan: Fix null dereference
If net_dev is NULL memcpy() will Oops.

Signed-off-by: Salym Senyonga <salymsash@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:59:31 -08:00
Shuah Khan d1fd43d7a6 staging/usbip: userspace to use linux header for usb_device_speed enum, missing speeds to speed_strings array
Remove usb_device_speed enum define from usbip_common.h and change it to
include linux/usb/ch9.h instead. Add speed strings for usb wireless and 3.0
to speed_strings array.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:55:41 -08:00
Shuah Khan 09c8c8fbf0 staging/usbip: simplify usbip_dump_usb_device() udev->speed handling
Change usbip_dump_usb_device() to use usb_speed_string() and remove the
code that does switch on udev->speed and builds custom speed strings.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:55:41 -08:00
Valentina Manea b7945b77cd staging: usbip: convert usbip-host driver to usb_device_driver
This driver was previously an interface driver. Since USB/IP
exports a whole device, not just an interface, it would make
sense to be a device driver.

This patch also modifies the way userspace sees and uses a
shared device:

* the usbip_status file is no longer created for interface 0, but for
the whole device (such as
/sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/usbip_status).
* per interface information, such as interface class or protocol, is
no longer sent/received; only device specific information is
transmitted.
* since the driver was moved one level below in the USB architecture,
there is no need to bind/unbind each interface, just the device as a
whole.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:54:30 -08:00
Shuah Khan a6646ea683 staging/usbip: Change vhci_hcd store_attach() device information message to include speed string
Change vhci_hcd store_attach() routine to include speed string in its device
information message. The current call to dev_info() prints out speed number
which is the enum number. Change to call usb_speed_string() to print speed
string in addition to the number.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:53:35 -08:00
Shuah Khan 3b92e8ae30 staging/usbip: remove vhci_hcd vhci_hub_status change message
When vhci_hcd is enabled, the following message floods the dmesg buffer.
This message doesn't provide any useful information other than cluttering
the dmesg buffer. Fix it by removing the message. There is another debug
message in this routine that dumps detailed port status change information.

[ 4062.716662] vhci_hcd: changed 0

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:53:35 -08:00
H Hartley Sweeten fb780d2133 staging: comedi: drivers: return '0' for successful attach
The comedi core expects the driver attach functions to return a
negative errno for failure. Any other value indicates success.

For consistency in the drivers, make sure they all return '0' to
indicate success.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:49:47 -08:00
H Hartley Sweeten c93999c213 staging: comedi: drivers: remove final 'attach' messages
These messages are just added noise. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:49:47 -08:00