diff options
author | andrew-elder <aelder@audioscience.com> | 2018-02-01 11:04:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-01 11:04:58 -0500 |
commit | 1885f450c32e1e202f65e9b84e29acc358ab4315 (patch) | |
tree | 4f9ff88443fc9df94513a4f93df5f38f3cda55af | |
parent | d5da9a9328d6a9195101258e0260c7d154954fd1 (diff) | |
download | Open-AVB-andrew-elder-patch-1.tar.gz |
igb_main.c, simplify comment and improve layoutandrew-elder-patch-1
-rw-r--r-- | kmod/igb/igb_main.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kmod/igb/igb_main.c b/kmod/igb/igb_main.c index 0ed5b161..13fdd6d0 100644 --- a/kmod/igb/igb_main.c +++ b/kmod/igb/igb_main.c @@ -10219,12 +10219,11 @@ static int igb_bind(struct file *file, void __user *argp) if (copy_from_user(&req, argp, sizeof(req))) return -EFAULT; - /*setting the last character of req.iface to '/0' - in order to avoid not null terminated string printk call. - Regardless of the initial state of string, that change - will prevent from stack leaking. - In this case no need to check the string or iterate over it - in order to ensure null termination exists*/ + /* + * Set the last character of req.iface to '/0' to + * guarantee null termination of req.iface string + * param in printk call. + */ req.iface[IGB_BIND_NAMESZ-1] = 0; printk("bind to iface %s\n", req.iface); |