Commit Graph
4 Commits
Author SHA1 Message Date
Gustavo A. R. Silva e25df7812c misc: ibmvsm: Fix potential NULL pointer dereference
There is a potential NULL pointer dereference in case kzalloc()
fails and returns NULL.

Fix this by adding a NULL check on *session*

Also, update the function header with information about the
expected return on failure and remove unnecessary variable rc.

This issue was detected with the help of Coccinelle.

Fixes: 0eca353e7a ("misc: IBM Virtual Management Channel Driver (VMC)")
Cc: [email protected]
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-01-18 14:14:14 +01:00
Bryant G. Ly c55e931887 misc: ibmvsm: Fix wrong assignment of return code
Currently the assignment is flipped and rc is always 0.

Signed-off-by: Bryant G. Ly <[email protected]>
Fixes: 0eca353e7a ("misc: IBM Virtual Management Channel Driver (VMC)")
Reviewed-by: Bradley Warrum <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-09-12 09:31:00 +02:00
Wei Yongjun 97b715b62e misc: ibmvmc: Use GFP_ATOMIC under spin lock
The function alloc_dma_buffer() is called from ibmvmc_add_buffer(),
in which a spin lock be held here, so we should use GFP_ATOMIC when
a lock is held.

Fixes: 0eca353e7a ("misc: IBM Virtual Management Channel Driver (VMC)")
Signed-off-by: Wei Yongjun <[email protected]>
Reviewed-by: Bryant G. Ly <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-07-07 17:35:00 +02:00
Bryant G. Ly 0eca353e7a misc: IBM Virtual Management Channel Driver (VMC)
This driver is a logical device which provides an
interface between the hypervisor and a management
partition. This interface is like a message
passing interface. This management partition
is intended to provide an alternative to HMC-based
system management.

VMC enables the Management LPAR to provide basic
logical partition functions:
- Logical Partition Configuration
- Boot, start, and stop actions for individual
  partitions
- Display of partition status
- Management of virtual Ethernet
- Management of virtual Storage
- Basic system management

This driver is to be used for the POWER Virtual
Management Channel Virtual Adapter on the PowerPC
platform. It provides a character device which
allows for both request/response and async message
support through the /dev/ibmvmc node.

Signed-off-by: Bryant G. Ly <[email protected]>
Reviewed-by: Steven Royer <[email protected]>
Reviewed-by: Adam Reznechek <[email protected]>
Reviewed-by: Randy Dunlap <[email protected]>
Tested-by: Taylor Jakobson <[email protected]>
Tested-by: Brad Warrum <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Michael Ellerman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-05-14 16:35:42 +02:00