All of lore.kernel.org
 help / color / mirror / Atom feed
From: Siddh Raman Pant <code@siddh.me>
To: "Khalid Masum" <khalid.masum.92@gmail.com>
Cc: "Greg KH" <gregkh@linuxfoundation.org>,
	"syzbot+c70d87ac1d001f29a058" 
	<syzbot+c70d87ac1d001f29a058@syzkaller.appspotmail.com>,
	"linux-kernel-mentees" 
	<linux-kernel-mentees@lists.linuxfoundation.org>,
	"linux-security-modules" <linux-security-module@vger.kernel.org>,
	"linux-kernel" <linux-kernel@vger.kernel.org>,
	"David Howells" <dhowells@redhat.com>,
	"Eric Dumazet" <edumazet@google.com>,
	"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
	"Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Subject: Re: [PATCH] kernel/watch_queue: Make pipe NULL while clearing watch_queue
Date: Sun, 24 Jul 2022 09:32:03 +0530	[thread overview]
Message-ID: <1822e5e8826.6da46246626262.8013427986163664185@siddh.me> (raw)
In-Reply-To: <CAABMjtEHCy=YcfqYfsQdqt9pWHHRoOLYHiRCsj8HjZVfAOB+6A@mail.gmail.com>

On Sun, 24 Jul 2022 09:15:27 +0530  Khalid Masum <khalid.masum.92@gmail.com> wrote:
> On Sat, Jul 23, 2022 at 8:29 PM Siddh Raman Pant via
> Linux-kernel-mentees <linux-kernel-mentees@lists.linuxfoundation.org>
> wrote:
> >
> > On Sat, 23 Jul 2022 19:33:33 +0530  Greg KH <gregkh@linuxfoundation.org> wrote:
> > > You should not use #ifdef in .c files, it's unmaintainable over time.
> > >
> > > thanks,
> > >
> > > greg k-h
> > >
> >
> > I used it because it is used in the same way in fs/pipe.c too (please check the
> > stated line number).
> >
> > That, in turn, is because `watch_queue` member in the `pipe_inode_info` struct
> > is defined that way (see line 80 of include/linux/pipe_fs_i.h), so I am forced
> > to use the ifdef guard.
> >
> Maybe, we can use the IS_ENABLED macro here to avoid ifdef in the .c file as
> suggested here:
> https://www.kernel.org/doc/html/v4.10/process/coding-style.html#conditional-compilation
> 
> if(IS_ENABLED(CONFIG_WATCH_QUEUE)){
>      ...
> }
> 
> > Thanks,
> > Siddh
> 
> Thanks,
>   -- Khalid Masum
 
I have looked at it again. The guard is superfluous in watch_queue.c (don't
need it since we are already in watch queue), hence I am sending v2 with it
removed.

Thanks,
Siddh

WARNING: multiple messages have this Message-ID (diff)
From: Siddh Raman Pant via Linux-kernel-mentees <linux-kernel-mentees@lists.linuxfoundation.org>
To: "Khalid Masum" <khalid.masum.92@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>,
	"Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
	syzbot+c70d87ac1d001f29a058
	<syzbot+c70d87ac1d001f29a058@syzkaller.appspotmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	David Howells <dhowells@redhat.com>,
	linux-security-modules <linux-security-module@vger.kernel.org>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	linux-kernel-mentees
	<linux-kernel-mentees@lists.linuxfoundation.org>
Subject: Re: [PATCH] kernel/watch_queue: Make pipe NULL while clearing watch_queue
Date: Sun, 24 Jul 2022 09:32:03 +0530	[thread overview]
Message-ID: <1822e5e8826.6da46246626262.8013427986163664185@siddh.me> (raw)
In-Reply-To: <CAABMjtEHCy=YcfqYfsQdqt9pWHHRoOLYHiRCsj8HjZVfAOB+6A@mail.gmail.com>

On Sun, 24 Jul 2022 09:15:27 +0530  Khalid Masum <khalid.masum.92@gmail.com> wrote:
> On Sat, Jul 23, 2022 at 8:29 PM Siddh Raman Pant via
> Linux-kernel-mentees <linux-kernel-mentees@lists.linuxfoundation.org>
> wrote:
> >
> > On Sat, 23 Jul 2022 19:33:33 +0530  Greg KH <gregkh@linuxfoundation.org> wrote:
> > > You should not use #ifdef in .c files, it's unmaintainable over time.
> > >
> > > thanks,
> > >
> > > greg k-h
> > >
> >
> > I used it because it is used in the same way in fs/pipe.c too (please check the
> > stated line number).
> >
> > That, in turn, is because `watch_queue` member in the `pipe_inode_info` struct
> > is defined that way (see line 80 of include/linux/pipe_fs_i.h), so I am forced
> > to use the ifdef guard.
> >
> Maybe, we can use the IS_ENABLED macro here to avoid ifdef in the .c file as
> suggested here:
> https://www.kernel.org/doc/html/v4.10/process/coding-style.html#conditional-compilation
> 
> if(IS_ENABLED(CONFIG_WATCH_QUEUE)){
>      ...
> }
> 
> > Thanks,
> > Siddh
> 
> Thanks,
>   -- Khalid Masum
 
I have looked at it again. The guard is superfluous in watch_queue.c (don't
need it since we are already in watch queue), hence I am sending v2 with it
removed.

Thanks,
Siddh
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  reply	other threads:[~2022-07-24  4:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 13:54 [PATCH] kernel/watch_queue: Make pipe NULL while clearing watch_queue Siddh Raman Pant
2022-07-23 13:54 ` Siddh Raman Pant via Linux-kernel-mentees
2022-07-23 14:03 ` Greg KH
2022-07-23 14:03   ` Greg KH
2022-07-23 14:29   ` Siddh Raman Pant via Linux-kernel-mentees
2022-07-23 14:29     ` Siddh Raman Pant
2022-07-24  3:45     ` Khalid Masum
2022-07-24  3:45       ` Khalid Masum
2022-07-24  4:02       ` Siddh Raman Pant [this message]
2022-07-24  4:02         ` Siddh Raman Pant via Linux-kernel-mentees
2022-07-23 14:04 ` Greg KH
2022-07-23 14:04   ` Greg KH
2022-07-23 14:29   ` Siddh Raman Pant via Linux-kernel-mentees
2022-07-23 14:29     ` Siddh Raman Pant
2022-07-27 14:46   ` David Howells
2022-07-27 14:46     ` David Howells
2022-07-27 16:20     ` Siddh Raman Pant
2022-07-27 16:20       ` Siddh Raman Pant via Linux-kernel-mentees
2022-07-31 18:11       ` Dipanjan Das
2022-07-31 18:11         ` Dipanjan Das
2022-07-31 18:46         ` Siddh Raman Pant
2022-07-31 18:46           ` Siddh Raman Pant via Linux-kernel-mentees
2022-08-01  8:47           ` Greg KH
2022-08-01  8:47             ` Greg KH
2022-08-01  8:53             ` Siddh Raman Pant
2022-08-01  8:53               ` Siddh Raman Pant via Linux-kernel-mentees
2022-08-01 21:06           ` Hillf Danton
2022-08-02  1:14             ` Siddh Raman Pant
2022-08-02  1:19             ` Siddh Raman Pant
2022-07-27 14:15 ` David Howells
2022-07-27 14:15   ` David Howells
2022-07-27 14:23   ` Siddh Raman Pant
2022-07-27 14:23     ` Siddh Raman Pant via Linux-kernel-mentees
2022-08-01 12:15 Hillf Danton
2022-08-01 12:52 ` Siddh Raman Pant
2022-08-01 12:52   ` Siddh Raman Pant via Linux-kernel-mentees

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1822e5e8826.6da46246626262.8013427986163664185@siddh.me \
    --to=code@siddh.me \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=khalid.masum.92@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=syzbot+c70d87ac1d001f29a058@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.