[LU-8179] libcfs/util/ioctl.h unconditionally redefines __user Created: 22/May/16 Updated: 15/Jun/16 Resolved: 15/Jun/16 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.9.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
__user attribute is used by sparse to determine what data could and could not be accessed. libcfs/util/ioctl.h is actually incuded by quite a bit of lustre kernel code, not just userspace, so we should make the redefinition conditional. |
| Comments |
| Comment by Gerrit Updater [ 22/May/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: http://review.whamcloud.com/20375 |
| Comment by James A Simmons [ 23/May/16 ] |
|
libcfs/util/ioctl.h should never be used in kernel space. As you pointed out it is lustre_ioctl.h that is broken. I rather see lustre_ioctl.h fixed instead. As a side topic __user should be handled more cleaning for user space. The reason for this work around is currently the uapi headers are not exposed to the lustre user land code. Plus if I do that we can remove byteorder.h from libcfs. |
| Comment by Gerrit Updater [ 14/Jun/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/20375/ |
| Comment by Joseph Gmitter (Inactive) [ 15/Jun/16 ] |
|
patch has landed to master for 2.9.0 |