Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571718
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [lustre-devel] [PATCH 60/60] staging: lustre: libcfs: fix minimum size check for libcfs ioctl |
| Date | 2017-02-01 17:40 +0100 |
| Message-ID | <t666S-8hp-29@gated-at.bofh.it> (permalink) |
| References | <t4Lea-8ik-3@gated-at.bofh.it> <t4LHb-8sD-5@gated-at.bofh.it> <t5hQK-2Xv-13@gated-at.bofh.it> <t5wmJ-3lt-1@gated-at.bofh.it> <t63sm-6Bo-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Feb 01, 2017 at 02:32:13PM +0100, Olaf Weber wrote: > On 31-01-17 03:25, James Simmons wrote: > > [...] > > > > 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? > > It's a requirement. That's horrid. Use container_of to be "safe" here please...
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 60/60] staging: lustre: libcfs: fix minimum size check for libcfs ioctl James Simmons <jsimmons@infradead.org> - 2017-01-31 03:30 +0100
Re: [PATCH 60/60] staging: lustre: libcfs: fix minimum size check for libcfs ioctl Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-31 09:20 +0100
Re: [lustre-devel] [PATCH 60/60] staging: lustre: libcfs: fix minimum size check for libcfs ioctl Olaf Weber <olaf@sgi.com> - 2017-02-01 14:50 +0100
Re: [lustre-devel] [PATCH 60/60] staging: lustre: libcfs: fix minimum size check for libcfs ioctl Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-02-01 17:40 +0100
csiph-web