Skip to content
Snippets Groups Projects
Select Git revision
  • 2000f5beabc9c6baf084de5f7879975408e3652c
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

file.c

  • Tyler Hicks's avatar
    2000f5be
    eCryptfs: file->private_data is always valid · 2000f5be
    Tyler Hicks authored
    
    When accessing the lower_file pointer located in private_data of
    eCryptfs files, there is no need to check to see if the private_data
    pointer has been initialized to a non-NULL value. The file->private_data
    and file->private_data->lower_file pointers are always initialized to
    non-NULL values in ecryptfs_open().
    
    This change quiets a Smatch warning:
    
      CHECK   /var/scm/kernel/linux/fs/ecryptfs/file.c
    fs/ecryptfs/file.c:321 ecryptfs_unlocked_ioctl() error: potential NULL dereference 'lower_file'.
    fs/ecryptfs/file.c:335 ecryptfs_compat_ioctl() error: potential NULL dereference 'lower_file'.
    
    Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
    Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
    Reviewed-by: default avatarGeyslan G. Bem <geyslan@gmail.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    2000f5be
    History
    eCryptfs: file->private_data is always valid
    Tyler Hicks authored
    
    When accessing the lower_file pointer located in private_data of
    eCryptfs files, there is no need to check to see if the private_data
    pointer has been initialized to a non-NULL value. The file->private_data
    and file->private_data->lower_file pointers are always initialized to
    non-NULL values in ecryptfs_open().
    
    This change quiets a Smatch warning:
    
      CHECK   /var/scm/kernel/linux/fs/ecryptfs/file.c
    fs/ecryptfs/file.c:321 ecryptfs_unlocked_ioctl() error: potential NULL dereference 'lower_file'.
    fs/ecryptfs/file.c:335 ecryptfs_compat_ioctl() error: potential NULL dereference 'lower_file'.
    
    Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
    Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
    Reviewed-by: default avatarGeyslan G. Bem <geyslan@gmail.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>