Skip to content

Commit e3275a8

Browse files
andy-shevlinusw
authored andcommitted
pinctrl: Relax user input size in pinmux_select()
This is debugfs and there is no much sense to strict the user from sending as much data as they can. The memdup_user_nul() will anyway fail if there is not enough memory. Relax the user input size by removing an artificial limitaion. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 0d8675e commit e3275a8

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/pinctrl/pinmux.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,6 @@ void pinmux_show_setting(struct seq_file *s,
677677
DEFINE_SHOW_ATTRIBUTE(pinmux_functions);
678678
DEFINE_SHOW_ATTRIBUTE(pinmux_pins);
679679

680-
#define PINMUX_SELECT_MAX 128
681680
static ssize_t pinmux_select(struct file *file, const char __user *user_buf,
682681
size_t len, loff_t *ppos)
683682
{
@@ -689,9 +688,6 @@ static ssize_t pinmux_select(struct file *file, const char __user *user_buf,
689688
unsigned int num_groups;
690689
int fsel, gsel, ret;
691690

692-
if (len > PINMUX_SELECT_MAX)
693-
return -ENOMEM;
694-
695691
buf = memdup_user_nul(user_buf, len);
696692
if (IS_ERR(buf))
697693
return PTR_ERR(buf);

0 commit comments

Comments
 (0)