lkml.org 
[lkml]   [2017]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 60/60] staging: lustre: libcfs: fix minimum size check for libcfs ioctl

> It looks like what happened is there were two patches applied out of
> sync. Let's add a fixes tag and CC the original author.

So the only problem here is the commit message. I will update it then.

> Fixes: ed2f549dc0f6 ("staging: lustre: libcfs: test if userland data is to small")
>
> This patch was probably correct when it was written but commit
> 1290932728e5 ("staging: lustre: Dynamic LNet Configuration (DLC) IOCTL
> changes") ended up getting applied first so the size was wrong.
>
> The lstcon_ioctl_entry() function doesn't have enough size checking.

This sounds like a separate patch. I will open a ticket about this and
your comments below.

> Also I'm uncomfortable with:
>
> data = container_of(hdr, struct libcfs_ioctl_data, ioc_hdr);
>
> If hdr isn't the first member of the struct then the code is broken but
> container_of() implies that that isn't a hard requirement. It should
> just be:
>
> data = (struct libcfs_ioctl_data *)hdr;

Don't know if hdr being first is a hard requirment. Doug, Amir do you know
if it is an requirement?

\
 
 \ /
  Last update: 2017-01-31 03:26    [W:0.094 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site