diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2022-02-21 11:33:57 +0100 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2022-02-21 11:33:57 +0100 |
| commit | d2206fcabdfaff3958ab67cc5b8f63257e57b889 (patch) | |
| tree | f6bc697bb2d10e49e5123b4e0cc30c11aafc3120 /drivers/misc | |
| parent | fe13889c390e14205e064d7e159e61eb5da4b1c3 (diff) | |
| parent | 509853f9e1e7b1490dc79f735a5dbafc9298f40d (diff) | |
| download | cachepc-linux-d2206fcabdfaff3958ab67cc5b8f63257e57b889.tar.gz cachepc-linux-d2206fcabdfaff3958ab67cc5b8f63257e57b889.zip | |
Merge tag 'irq-api-2022-02-21' into irq/core
Merge the generic_handle_irq_safe() API back into irq/core.
Diffstat (limited to 'drivers/misc')
| -rw-r--r-- | drivers/misc/eeprom/ee1004.c | 3 | ||||
| -rw-r--r-- | drivers/misc/fastrpc.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/misc/eeprom/ee1004.c index bb9c4512c968..9fbfe784d710 100644 --- a/drivers/misc/eeprom/ee1004.c +++ b/drivers/misc/eeprom/ee1004.c @@ -114,6 +114,9 @@ static ssize_t ee1004_eeprom_read(struct i2c_client *client, char *buf, if (offset + count > EE1004_PAGE_SIZE) count = EE1004_PAGE_SIZE - offset; + if (count > I2C_SMBUS_BLOCK_MAX) + count = I2C_SMBUS_BLOCK_MAX; + return i2c_smbus_read_i2c_block_data_or_emulated(client, offset, count, buf); } diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 4ccbf43e6bfa..aa1682b94a23 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -1288,7 +1288,14 @@ static int fastrpc_dmabuf_alloc(struct fastrpc_user *fl, char __user *argp) } if (copy_to_user(argp, &bp, sizeof(bp))) { - dma_buf_put(buf->dmabuf); + /* + * The usercopy failed, but we can't do much about it, as + * dma_buf_fd() already called fd_install() and made the + * file descriptor accessible for the current process. It + * might already be closed and dmabuf no longer valid when + * we reach this point. Therefore "leak" the fd and rely on + * the process exit path to do any required cleanup. + */ return -EFAULT; } |
