[LU-8855] 32 bit compat stat() syscalls expect device majors and minors to be less than 256 Created: 21/Nov/16 Updated: 07/Jul/17 Resolved: 24/Jan/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.10.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | John Hammond | Assignee: | John Hammond |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Severity: | 3 | ||||
| Rank (Obsolete): | 9223372036854775807 | ||||
| Description |
|
A customer reported having problems accessing a file on Lustre with a 32-bit binary running on a 64-bit kernel: 31583 access("infile_how", F_OK) = 0
31583 open("infile_how", O_RDWR) = 3
31583 fstat(3, 0xfff4d52c) = -1 EOVERFLOW (Value too large for defined data type)
31583 stat("infile_how", 0xfff4d51c) = -1 EOVERFLOW (Value too large for defined data type)
That fstat() doesn't return EOVERFLOW on the local file system: 31823 access("infile_how", F_OK <unfinished ...>
31824 fstat(0, <unfinished ...>
31823 <... access resumed> ) = 0
31824 <... fstat resumed> {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
31823 open("infile_how", O_RDWR <unfinished ...>
31824 fstat(1, <unfinished ...>
31823 <... open resumed> ) = 3
31824 <... fstat resumed> {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
31823 fstat(3, <unfinished ...>
31824 fstat(2, <unfinished ...>
31823 <... fstat resumed> {st_mode=S_IFIFO, st_size=876682292077977496, ...}) = 0
31824 <... fstat resumed> {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
31823 stat("infile_how", {st_mode=S_IFIFO, st_size=876682292077977496, ...}) = 0
The values packed into stat->dev and stat->rdev by ll_getattr() are failing the old_valid_dev() checks in cp_compat_stat() from compat_sys_newfstat() and compat_sys_newstat(). |
| Comments |
| Comment by Gerrit Updater [ 21/Nov/16 ] |
|
John L. Hammond (john.hammond@intel.com) uploaded a new patch: http://review.whamcloud.com/23877 |
| Comment by Gerrit Updater [ 24/Jan/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/23877/ |
| Comment by Peter Jones [ 24/Jan/17 ] |
|
Landed for 2.10 |