bb8a4fcb | 17-Sep-2021 |
Johan Hovold <johan@kernel.org> |
ipack: ipoctal: fix module reference leak
A reference to the carrier module was taken on every open but was only released once when the final reference to the tty struct was dropped.
Fix this by ta
ipack: ipoctal: fix module reference leak
A reference to the carrier module was taken on every open but was only released once when the final reference to the tty struct was dropped.
Fix this by taking the module reference and initialising the tty driver data when installing the tty.
Fixes: 82a82340bab6 ("ipoctal: get carrier driver to avoid rmmod") Cc: stable@vger.kernel.org # 3.18 Cc: Federico Vaga <federico.vaga@cern.ch> Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20210917114622.5412-6-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
445c8132 | 17-Sep-2021 |
Johan Hovold <johan@kernel.org> |
ipack: ipoctal: fix missing allocation-failure check
Add the missing error handling when allocating the transmit buffer to avoid dereferencing a NULL pointer in write() should the allocation ever fa
ipack: ipoctal: fix missing allocation-failure check
Add the missing error handling when allocating the transmit buffer to avoid dereferencing a NULL pointer in write() should the allocation ever fail.
Fixes: ba4dc61fe8c5 ("Staging: ipack: add support for IP-OCTAL mezzanine board") Cc: stable@vger.kernel.org # 3.5 Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20210917114622.5412-5-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
cd20d592 | 17-Sep-2021 |
Johan Hovold <johan@kernel.org> |
ipack: ipoctal: fix tty-registration error handling
Registration of the ipoctal tty devices is unlikely to fail, but if it ever does, make sure not to deregister a never registered tty device (and d
ipack: ipoctal: fix tty-registration error handling
Registration of the ipoctal tty devices is unlikely to fail, but if it ever does, make sure not to deregister a never registered tty device (and dereference a NULL pointer) when the driver is later unbound.
Fixes: 2afb41d9d30d ("Staging: ipack/devices/ipoctal: Check tty_register_device return value.") Cc: stable@vger.kernel.org # 3.7 Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20210917114622.5412-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
65c001df | 17-Sep-2021 |
Johan Hovold <johan@kernel.org> |
ipack: ipoctal: fix tty registration race
Make sure to set the tty class-device driver data before registering the tty to avoid having a racing open() dereference a NULL pointer.
Fixes: 9c1d784afc6
ipack: ipoctal: fix tty registration race
Make sure to set the tty class-device driver data before registering the tty to avoid having a racing open() dereference a NULL pointer.
Fixes: 9c1d784afc6f ("Staging: ipack/devices/ipoctal: Get rid of ipoctal_list.") Cc: stable@vger.kernel.org # 3.7 Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20210917114622.5412-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
50f05bd1 | 10-Aug-2021 |
Dongliang Mu <mudongliangabcd@gmail.com> |
ipack: tpci200: fix memory leak in the tpci200_register
The error handling code in tpci200_register does not free interface_regs allocated by ioremap and the current version of error handling code i
ipack: tpci200: fix memory leak in the tpci200_register
The error handling code in tpci200_register does not free interface_regs allocated by ioremap and the current version of error handling code is problematic.
Fix this by refactoring the error handling code and free interface_regs when necessary.
Fixes: 43986798fd50 ("ipack: add error handling for ioremap_nocache") Cc: stable@vger.kernel.org Reported-by: Dongliang Mu <mudongliangabcd@gmail.com> Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com> Link: https://lore.kernel.org/r/20210810100323.3938492-2-mudongliangabcd@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
0419bf0f | 22-May-2021 |
Aditya Srivastava <yashsri421@gmail.com> |
ipac: tpci200: fix kernel-doc syntax and remove filename from file header
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/ipack/c
ipac: tpci200: fix kernel-doc syntax and remove filename from file header
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/ipack/carriers/tpci200 follows this syntax, but the content inside does not comply with kernel-doc.
This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc.
For e.g., running scripts/kernel-doc -none on drivers/ipack/carriers/tpci200.c emits: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * tpci200.c
Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it.
Also remove the redundant file name from the comment headers.
Acked-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Aditya Srivastava <yashsri421@gmail.com> Link: https://lore.kernel.org/r/20210522124051.12540-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
b716f42e | 22-May-2021 |
Aditya Srivastava <yashsri421@gmail.com> |
ipac: ipoctal: fix kernel-doc syntax and remove filename from file headers
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/ipack/
ipac: ipoctal: fix kernel-doc syntax and remove filename from file headers
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/ipack/devices/ipoctal follows this syntax, but the content inside does not comply with kernel-doc.
This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc.
For e.g., running scripts/kernel-doc -none on drivers/ipack/devices/ipoctal.h emits: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * ipoctal.h
Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it.
Also remove the redundant file name from the comment headers.
Acked-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Aditya Srivastava <yashsri421@gmail.com> Link: https://lore.kernel.org/r/20210522121944.11182-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
609cf09c | 07-Feb-2021 |
Uwe Kleine-König <uwe@kleine-koenig.org> |
ipack: Handle a driver without remove callback
A driver that only consumes devm-managed resources might well have no remove callback. Additionally given that the device core ignores the return value
ipack: Handle a driver without remove callback
A driver that only consumes devm-managed resources might well have no remove callback. Additionally given that the device core ignores the return value of ipack_bus_remove() stop returning an error code.
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Link: https://lore.kernel.org/r/20210207215556.96371-2-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|