Hello Sascha Hauer,
The patch aecfbdb1803b: "staging: drm/imx: add i.MX IPUv3 base
driver" from Sep 21, 2012, leads to the following
static checker warning:
"drivers/staging/imx-drm/ipu-v3/ipu-common.c:110
ipu_ch_param_write_field()
warn: buffer overflow 'base->word[word]->data' 5 <= 5
Hello Sascha Hauer,
This is a semi-automatic email about new static checker warnings.
The patch aecfbdb1803b: "staging: drm/imx: add i.MX IPUv3 base
driver" from Sep 21, 2012, leads to the following Smatch complaint:
drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c:164 ipu_dmfc_setup_channel()
On Fri, 01 Nov 2013, micky_ch...@realsil.com.cn wrote:
> From: Micky Ching
>
> Add card reader rtl8042, rtl8402 is much like rtl8411, so just add it to
> rtl8411.c
>
> Signed-off-by: Micky Ching
> ---
> drivers/mfd/rtl8411.c | 62
>
> drive
Traditionally the "get" functions increment the reference count of the
object that is returned, which does not happen with vme_slot_get. The
function vme_slot_get returns the physical VME slot associated with a
particular struct vme_dev. Rename vme_slot_num to avoid any confusion.
Signed-off-by: M
The match function for vme_user is completely wrong. It will blindly bind
against the first VME slot on each bus (at this point that would be just the
first bus as the driver can only handle one bus).
The original intention (before some major subsystem changes) was that the
driver bind against the
My appologies - the script I had to send patches had got a bit broken and I'd
completely forgotten...
Martyn
On 08/11/13 11:55, y wrote:
> From: Martyn Welch
>
> The match function for vme_user is completely wrong. It will blindly bind
> against the first VME slot on each bus (at this point tha
Traditionally the "get" functions increment the reference count of the
object that is returned, which does not happen with vme_slot_get. The
function vme_slot_get returns the physical VME slot associated with a
particular struct vme_dev. Rename vme_slot_num to avoid any confusion.
Signed-off-by: M
Good Day,
My name is Mr. Luis Elmer, i am the credit officer in Banco Santander Plc,
London, UK. I have a business proposal of $28,800,000, for you from my bank.
There were no beneficiaries stated concerning these funds which means no one
would ever come forward to claim it. I want us to work
Good Day,
My name is Mr. Luis Elmer, i am the credit officer in Banco Santander Plc,
London, UK. I have a business proposal of $28,800,000, for you from my bank.
There were no beneficiaries stated concerning these funds which means no one
would ever come forward to claim it. I want us to work
Acquire the `attach_lock` semaphore in the `struct comedi_device` while
modifying the `attached` flag. This is a "write" acquire. Note that
the main mutex in the `struct comedi_device` is also held at this time.
Tasks wishing to check the device is attached will need to either
acquire the main mu
Calls to `comedi_auto_unconfig()` from low-level comedi drivers result
in the `struct comedi_device` being freed along with any comedi data
buffers. That's bad news for the 'read' and 'write' file operations
that currently have no protection from this (they don't use the main
mutex in the `struct
Add a `struct kref refcount` member to `struct comedi_device` to allow
safe destruction of the comedi device. Only free the comedi device via
the 'release' callback `kref_put()`. Currently, nothing calls
`kref_put()`, so the safe destruction is ineffective, but this will be
addressed by later pat
The comedi core module's handling of the `COMEDI_DEVCONFIG` ioctl will
not allow a device to be detached if it is busy. However, comedi
devices can also be auto-detached due to a removal of a hardware device.
One of the things we should do in that case is cancel any asynchronous
commands that are
Add a member `detach_count` to `struct comedi_device` that is
incremented every time the device gets detached. This will be used in
some validity checks in the 'read' and 'write' file operations to make
sure the attachment remains valid.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/come
The 'write' file operation for comedi devices does not use the main
mutex in the `struct comedi_device` to avoid contention with some ioctls
that may take a while to complete. Use the `attach_lock` semaphore to
protect against detachment while the 'write' operation is in progress.
This is a `struc
In the 'open' file operation handler `comedi_open()` in "comedi_fops.c",
call `comedi_dev_get_from_minor()` instead of `comedi_dev_from_minor()`
to get the pointer to the `struct comedi_device`. This increments the
reference to prevent it being freed. Call `comedi_dev_put()` to
decrement the refe
Call `comedi_dev_get_from_minor()` instead of `comedi_dev_from_minor()`
in the sysfs attribute handler functions to increment the reference of
the `struct comedi_device` during the operation. Call
`comedi_dev_put()` to decrement the reference afterwards.
Signed-off-by: Ian Abbott
---
drivers/st
Add function `struct comedi_device *comedi_dev_get_from_minor(unsigned
minor)`. This behaves like the existing `comedi_dev_from_minor()`
except that it also increments the `struct kref refcount` member (via
new helper function `comedi_dev_get()`) to prevent it being freed. If
it returns a valid p
In the seq_file 'show' handler for "/proc/comedi" - `comedi_read()` in
"comedi/proc.c", call `comedi_dev_get_from_minor()` instead of
`comedi_dev_from_minor()` to increment the reference counter for the
`struct comedi_device` while it is being examined. Call
`comedi_dev_put()` to decrement the re
Change `comedi_driver_unregister()` to call
`comedi_dev_get_from_minor()` instead of `comedi_dev_from_minor()` when
finding devices using the driver. This increments the reference count
to prevent the device being removed while it is being checked to see if
it is attached to the driver. Call `com
The 'read' file operation for comedi devices does not use the main mutex
in the `struct comedi_device` to avoid contention with some ioctls that
may take a while to complete. Use the `attach_lock` semaphore to
protect against detachment while the 'read' operation is in progress.
This is a `struct
Since the `struct comedi_device` should now be protected from being
freed while an open file object is using it, use the `private_data`
member of the `struct file` to point to it. Set it in `comedi_open()`
and use it in the other file operation handlers instead of calling
`comedi_dev_from_minor()`
Two structures defined in "comedidev.h" have an element of type
`spinlock_t`, so add `#include ` to declare it.
One structure has an element of type `struct mutex` so add `#include
` to declare it.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedidev.h | 2 ++
1 file changed, 2 inserti
Wake up all waiters on the comedi subdevice's async wait queue whenever
the subdevice is marked "non-busy". This happens when an asynchronous
command is cancelled or when a command is terminated and all data has
been read or written. Note: use `wake_up_interruptible_all()` as we
only use interrup
The functions in "kcomedilib" need to prevent the comedi device being
detached during their operation. This can be done by acquiring either
the main mutex or the "attach lock" semaphore in the `struct
comedi_device`. Use the attach lock when merely checking whether the
device is attached. Use th
Rename the local function `cleanup_device()` to
`comedi_device_detach_cleanup()`. It is only called from the
`comedi_device_detach()` function and that is called from
`comedi_device_cleanup()` and other places. The more specific function
name seems less confusing.
Signed-off-by: Ian Abbott
---
If a comedi device is automatically detached by `comedi_auto_unconfig()`
any data buffers associated with subdevices that support asynchronous
commands will be freed. If the buffer is mmapped at the time, bad
things are likely to happen! Prevent this by moving some of the buffer
details from `str
`comedi_read_subdevice()` and `comedi_write_subdevice()` respectively
determine the read and write subdevice to use for a comedi device,
depending on a minor device number passed in. The comedi device has a
main "board" minor device number and may also have dynamically assigned,
subdevice-specific
The `comedi_dev_from_minor()` function is no longer used, so remove it.
Calls to it have either been replaced by calls to
`comedi_dev_get_from_minor()` or by using the `private_data` member of
the open file object.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 28 -
Low-level comedi drivers that use the "kcomedilib" module (currently only
the "comedi_bond" driver) call `comedi_open()` to "open" another comedi
device (not as a file) and `comedi_close()` to "close" it. (Note: these
are the functions exported by the "kcomedilib" module, not the
identically named
The 'read' and 'write' file operations on comedi devices do not use the
main mutex in the `struct comedi_device` to avoid contention with ioctls
that may take a while to complete. However, it is necessary to protect
against the device being detached while the operation is in progress.
Add member `
The 'kcomedilib' module used to provide functions to allow asynchronous
comedi commands to be set up from another kernel module, but now
commands can only be set up by ioctls from user space via the core
comedi module. Since support for commands initiated from kernel space
has been dropped, the `c
32 matches
Mail list logo