Re: [PATCH] fanotify: support custom default close response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ibrahim,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.16-rc3 next-20250623]
[cannot apply to jack-fs/fsnotify]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ibrahim-Jirdeh/fanotify-support-custom-default-close-response/20250624-032902
base:   linus/master
patch link:    https://lore.kernel.org/r/20250623192503.2673076-1-ibrahimjirdeh%40meta.com
patch subject: [PATCH] fanotify: support custom default close response
config: arm-randconfig-002-20250624 (https://download.01.org/0day-ci/archive/20250624/202506241819.lF9Wd4Tn-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250624/202506241819.lF9Wd4Tn-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506241819.lF9Wd4Tn-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   fs/notify/fanotify/fanotify_user.c: In function 'finish_permission_event.constprop':
>> fs/notify/fanotify/fanotify_user.c:316:3: warning: argument 2 null where non-null expected [-Wnonnull]
      memcpy(&event->audit_rule, friar, sizeof(*friar));
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/string.h:65,
                    from include/linux/bitmap.h:13,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/rcupdate.h:29,
                    from include/linux/sysctl.h:26,
                    from include/linux/fanotify.h:5,
                    from fs/notify/fanotify/fanotify_user.c:2:
   arch/arm/include/asm/string.h:20:15: note: in a call to function 'memcpy' declared here
    extern void * memcpy(void *, const void *, __kernel_size_t);
                  ^~~~~~


vim +316 fs/notify/fanotify/fanotify_user.c

70529a199574c1 Richard Guy Briggs 2023-02-03  301  
40873284d7106f Jan Kara           2019-01-08  302  /*
40873284d7106f Jan Kara           2019-01-08  303   * Finish processing of permission event by setting it to ANSWERED state and
40873284d7106f Jan Kara           2019-01-08  304   * drop group->notification_lock.
40873284d7106f Jan Kara           2019-01-08  305   */
40873284d7106f Jan Kara           2019-01-08  306  static void finish_permission_event(struct fsnotify_group *group,
70529a199574c1 Richard Guy Briggs 2023-02-03  307  				    struct fanotify_perm_event *event, u32 response,
70529a199574c1 Richard Guy Briggs 2023-02-03  308  				    struct fanotify_response_info_audit_rule *friar)
40873284d7106f Jan Kara           2019-01-08  309  				    __releases(&group->notification_lock)
40873284d7106f Jan Kara           2019-01-08  310  {
fabf7f29b3e2ce Jan Kara           2019-01-08  311  	bool destroy = false;
fabf7f29b3e2ce Jan Kara           2019-01-08  312  
40873284d7106f Jan Kara           2019-01-08  313  	assert_spin_locked(&group->notification_lock);
70529a199574c1 Richard Guy Briggs 2023-02-03  314  	event->response = response & ~FAN_INFO;
70529a199574c1 Richard Guy Briggs 2023-02-03  315  	if (response & FAN_INFO)
70529a199574c1 Richard Guy Briggs 2023-02-03 @316  		memcpy(&event->audit_rule, friar, sizeof(*friar));
70529a199574c1 Richard Guy Briggs 2023-02-03  317  
fabf7f29b3e2ce Jan Kara           2019-01-08  318  	if (event->state == FAN_EVENT_CANCELED)
fabf7f29b3e2ce Jan Kara           2019-01-08  319  		destroy = true;
fabf7f29b3e2ce Jan Kara           2019-01-08  320  	else
40873284d7106f Jan Kara           2019-01-08  321  		event->state = FAN_EVENT_ANSWERED;
40873284d7106f Jan Kara           2019-01-08  322  	spin_unlock(&group->notification_lock);
fabf7f29b3e2ce Jan Kara           2019-01-08  323  	if (destroy)
fabf7f29b3e2ce Jan Kara           2019-01-08  324  		fsnotify_destroy_event(group, &event->fae.fse);
40873284d7106f Jan Kara           2019-01-08  325  }
40873284d7106f Jan Kara           2019-01-08  326  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux