Skip to content

Commit

Permalink
HSI: hsi_char: Remove max_data_size from sysfs
Browse files Browse the repository at this point in the history
Remove max_data_size sysfs entry. Otherwise is possible
to have a buffer overrun if its value is increased after
the device is open.

Signed-off-by: Carlos Chinea <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Linus Walleij <[email protected]>
  • Loading branch information
carloschinea committed Apr 23, 2012
1 parent ec1c56f commit fdadb6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hsi/clients/hsi_char.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ struct hsc_client_data {
static unsigned int hsc_major;
/* Maximum buffer size that hsi_char will accept from userspace */
static unsigned int max_data_size = 0x1000;
module_param(max_data_size, uint, S_IRUSR | S_IWUSR);
module_param(max_data_size, uint, 0);
MODULE_PARM_DESC(max_data_size, "max read/write data size [4,8..65536] (^2)");

static void hsc_add_tail(struct hsc_channel *channel, struct hsi_msg *msg,
Expand Down

0 comments on commit fdadb6e

Please sign in to comment.